Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -157,15 +157,3 @@ $(document).ready(function() {
|
||||
}
|
||||
//end Notificaiotn message
|
||||
});
|
||||
|
||||
/* start order reservation function */
|
||||
function audioPlayBackground(shop_code,audio){
|
||||
// console.log(shop_code);
|
||||
//audio play
|
||||
var audio = new Audio('/'+audio); // define your audio
|
||||
// setTimeout(function(){
|
||||
// audio.loop = true;
|
||||
audio.play();
|
||||
// },10000);
|
||||
}
|
||||
/* end order reservation function */
|
||||
|
||||
@@ -579,4 +579,16 @@ function timeFormat(date){
|
||||
(isPM ? ' PM' : ' AM');
|
||||
return time;
|
||||
}
|
||||
/* end order reservation function */
|
||||
|
||||
/* start order reservation function */
|
||||
function audioPlayBackground(shop_code,audio){
|
||||
// console.log(shop_code);
|
||||
//audio play
|
||||
var audio = new Audio('/'+audio); // define your audio
|
||||
// setTimeout(function(){
|
||||
// audio.loop = true;
|
||||
audio.play();
|
||||
// },10000);
|
||||
}
|
||||
/* end order reservation function */
|
||||
@@ -15,7 +15,6 @@
|
||||
//= require BSBMaterial/turbolink_admin.js
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
//= require order_reservation.js
|
||||
|
||||
/* Constant Varaibles */
|
||||
_CREDIT_PAYMENTS_ = "/ CREDIT PAYMENTS";
|
||||
|
||||
@@ -16,17 +16,18 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
|
||||
if status
|
||||
if params[:customer_id] && !params[:customer_id].nil?
|
||||
customer = OrderReservation.addCustomer(params)
|
||||
customer_id = customer.id
|
||||
customer_id = customer.customer_id
|
||||
else
|
||||
check_customer = Customer.find_by_email_and_membership_id_and_customer_type(params[:email],params[:membership_id],'Doemal')
|
||||
if !check_customer.nil?
|
||||
customer_id = check_customer.customer_id
|
||||
else
|
||||
customer = OrderReservation.addCustomer(params)
|
||||
customer_id = customer.id
|
||||
customer_id = customer.customer_id
|
||||
end
|
||||
end
|
||||
if !customer_id.nil?
|
||||
|
||||
if customer_id.nil?
|
||||
render :json => { :status => false, :message => "email and customer are already existed!" }
|
||||
else
|
||||
render :json => { :status => true, :data => { :customer_id => customer_id} }
|
||||
|
||||
@@ -22,7 +22,7 @@ class OrderReservation < ApplicationRecord
|
||||
else
|
||||
gender = "Male"
|
||||
end
|
||||
if params[:customer_id].nil?
|
||||
if params[:customer_id] && !params[:customer_id].nil?
|
||||
customer = Customer.find(params[:customer_id])
|
||||
else
|
||||
customer = Customer.new
|
||||
@@ -37,7 +37,6 @@ class OrderReservation < ApplicationRecord
|
||||
customer.customer_type = "Doemal"
|
||||
customer.tax_profiles = ["2"]
|
||||
customer.save
|
||||
|
||||
# unless customer.valid?
|
||||
# render json: {
|
||||
# status: 422,
|
||||
|
||||
Reference in New Issue
Block a user