Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into cloud

This commit is contained in:
Aung Myo
2018-01-12 17:11:48 +06:30
2 changed files with 38 additions and 23 deletions

View File

@@ -36,6 +36,7 @@ class Api::CheckInProcessController < Api::ApiController
if dining_facility.status == "available" if dining_facility.status == "available"
lookup_checkout_time = Lookup.collection_of("checkout_time") lookup_checkout_time = Lookup.collection_of("checkout_time")
if !lookup_checkout_time.empty?
checkout_at = Time.now.utc checkout_at = Time.now.utc
if !lookup_checkout_time.nil? if !lookup_checkout_time.nil?
@@ -60,6 +61,9 @@ class Api::CheckInProcessController < Api::ApiController
booking.save! booking.save!
render :json => { :status => true, :checkout_at => booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") } render :json => { :status => true, :checkout_at => booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") }
else
render :json => { :status => true }
end
else else
error_message = "#{dining_facility.type} is not available!" error_message = "#{dining_facility.type} is not available!"
render :json => { :status => false, :error_message => error_message } render :json => { :status => false, :error_message => error_message }

View File

@@ -168,6 +168,17 @@
} }
else if(payment_type == "CUP"){ else if(payment_type == "CUP"){
$("#loading_wrapper").hide(); $("#loading_wrapper").hide();
swal({
title: 'Information!',
text: 'Settlement is successfully.',
type: 'success',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/shift/close';
});
// reqCBBankAlipaySettlement(); // reqCBBankAlipaySettlement();
} }
// else if(payment_type == "Alipay"){ // else if(payment_type == "Alipay"){