Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into sqa-1804-001
This commit is contained in:
@@ -68,11 +68,13 @@ $(function() {
|
|||||||
if(waiting_time.getTime() < requested_time.getTime()){
|
if(waiting_time.getTime() < requested_time.getTime()){
|
||||||
var time_diff = (requested_time.getTime() - waiting_time.getTime());
|
var time_diff = (requested_time.getTime() - waiting_time.getTime());
|
||||||
var expected_time = (Math.floor(time_diff) / 1000) / 60;
|
var expected_time = (Math.floor(time_diff) / 1000) / 60;
|
||||||
callback_url(callback,ref_no,order_id,status,expected_time,waiting_time);
|
|
||||||
}else{
|
}else{
|
||||||
$("#waiting_time").val("");
|
var time_diff = (waiting_time.getTime() - requested_time.getTime());
|
||||||
$("#waiting_timeErr").text("Expected waiting time is greater than requested time!");
|
var expected_time = (Math.floor(time_diff) / 1000) / 60;
|
||||||
|
// $("#waiting_time").val("");
|
||||||
|
// $("#waiting_timeErr").text("Expected waiting time is greater than requested time!");
|
||||||
}
|
}
|
||||||
|
callback_url(callback,ref_no,order_id,status,expected_time,waiting_time);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ class BaseOrigamiController < ActionController::Base
|
|||||||
before_action :check_user
|
before_action :check_user
|
||||||
|
|
||||||
#before_action :check_installation
|
#before_action :check_installation
|
||||||
|
protect_from_forgery with: :exception
|
||||||
|
|
||||||
helper_method :shop_detail, :current_token
|
helper_method :shop_detail, :current_token
|
||||||
|
|
||||||
@@ -22,10 +23,6 @@ class BaseOrigamiController < ActionController::Base
|
|||||||
}.to_json
|
}.to_json
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if ENV["SERVER_MODE"] != 'cloud'
|
|
||||||
protect_from_forgery with: :exception
|
|
||||||
end
|
|
||||||
|
|
||||||
if current_user.nil?
|
if current_user.nil?
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ class Origami::OtherChargesController < BaseOrigamiController
|
|||||||
else
|
else
|
||||||
@table = nil
|
@table = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -80,7 +79,5 @@ class Origami::OtherChargesController < BaseOrigamiController
|
|||||||
dining = {:table_id => table_id, :table_type => table.type }
|
dining = {:table_id => table_id, :table_type => table.type }
|
||||||
render :json => dining.to_json
|
render :json => dining.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -8,7 +8,7 @@ class ActionController::Base
|
|||||||
from = request.subdomain.downcase + "." + request.domain.downcase
|
from = request.subdomain.downcase + "." + request.domain.downcase
|
||||||
@license = cache_license(ENV["SX_PROVISION_URL"], from) # request.subdomain.downcase
|
@license = cache_license(ENV["SX_PROVISION_URL"], from) # request.subdomain.downcase
|
||||||
if (!@license.nil?)
|
if (!@license.nil?)
|
||||||
logger.info "Location - " + @license.dbhost
|
logger.info "Location - " + @license.dbschema
|
||||||
ActiveRecord::Base.establish_connection(website_connection(@license))
|
ActiveRecord::Base.establish_connection(website_connection(@license))
|
||||||
# authenticate_session_token
|
# authenticate_session_token
|
||||||
# logger.info "Connecting to - " + @license.subdomain + " - "+ @license.dbhost + "@" + @license.dbschema
|
# logger.info "Connecting to - " + @license.subdomain + " - "+ @license.dbhost + "@" + @license.dbschema
|
||||||
@@ -97,7 +97,7 @@ class ActionController::API
|
|||||||
from = request.subdomain.downcase + "." + request.domain.downcase
|
from = request.subdomain.downcase + "." + request.domain.downcase
|
||||||
@license = cache_license(ENV["SX_PROVISION_URL"], from) # request.subdomain.downcase
|
@license = cache_license(ENV["SX_PROVISION_URL"], from) # request.subdomain.downcase
|
||||||
if (!@license.nil?)
|
if (!@license.nil?)
|
||||||
# logger.info "Location - " + @license.dbhost
|
logger.info "Location - " + @license.dbschema
|
||||||
ActiveRecord::Base.establish_connection(website_connection(@license))
|
ActiveRecord::Base.establish_connection(website_connection(@license))
|
||||||
# authenticate_session_token
|
# authenticate_session_token
|
||||||
# logger.info "Connecting to - " + @license.subdomain + " - "+ @license.dbhost + "@" + @license.dbschema
|
# logger.info "Connecting to - " + @license.subdomain + " - "+ @license.dbhost + "@" + @license.dbschema
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ every 1.minutes do
|
|||||||
runner "DiningFacility.checkin_time"
|
runner "DiningFacility.checkin_time"
|
||||||
end
|
end
|
||||||
|
|
||||||
every 3.minutes do
|
every 10.minutes do
|
||||||
runner "OrderReservation.check_new_order"
|
runner "OrderReservation.check_new_order"
|
||||||
end
|
end
|
||||||
|
|
||||||
every 5.minutes do
|
every 10.minutes do
|
||||||
runner "OrderReservation.check_order_send_to_kitchen"
|
runner "OrderReservation.check_order_send_to_kitchen"
|
||||||
end
|
end
|
||||||
|
|
||||||
every 5.minutes do
|
every 10.minutes do
|
||||||
runner "OrderReservation.check_order_ready_to_delivery"
|
runner "OrderReservation.check_order_ready_to_delivery"
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user