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

This commit is contained in:
phyusin
2018-05-10 15:51:00 +06:30
6 changed files with 35 additions and 33 deletions

View File

@@ -62,6 +62,7 @@ $(document).ready(function() {
railBorderRadius: '0',
touchScrollStep : 45
});
// $('.delete').click(function(){
// var method = $(this).attr('data-method');

View File

@@ -452,6 +452,10 @@ iframe {
width: 150%;
height: 100%;
}
#receipt_pdf {
height: 400px;
}
/* End iframe */
/* section class for webview */

View File

@@ -548,19 +548,18 @@
jQuery(function(){
var menus = JSON.parse(localStorage.getItem("menus"));
if (menus != null) {
console.log("menu")
id = menus[0]["id"];
var id = menus[0]["categories"][0]["id"];
console.log(id);
}else{
id = 1;
var id = 1;
}
jQuery('.first_'+id).click();
});
$(document).ready(function () {
var menus = JSON.parse(localStorage.getItem("menus"));
if (menus != null) {
console.log("menu")
console.log("menu");
menu_cache_append(menus);
}else{
$("#menu_data").removeClass("hidden");
@@ -599,27 +598,26 @@
var category = menus[0]["categories"];
for(var ii in category) {
// <li class="nav-item product" data-ref="<%= origami_get_all_product_path %>">
// <a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
// </li>
if (category[ii]["valid_time"]== true){
if (category[ii]["parent_id"] == null ){
if(type){
if (category[ii]["is_available"]== true){
if (category[ii]["valid_time"]== true){
if (category[ii]["parent_id"] == null ){
if(type){
if (category[ii]["code"].includes("SPL") != true) {
category_list_template(category[ii]);
}
}else{
if ($("#table_get_current").text()) {
if (category[ii]["code"].includes("SPL") != true) {
category_list_template(category[ii]);
}
}else{
if ($("#table_get_current").text()) {
if (category[ii]["code"].includes("SPL") != true) {
category_list_template(category[ii]);
}else {
category_list_template(category[ii]);
}
}else {
category_list_template(category[ii]);
}
}
}
}
}
}
}
}
$(".tables").on('click', function () {

View File

@@ -208,7 +208,6 @@
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
<script>
$(function() {
console.log(localStorage.getItem("menus"))
$.ajax({
type: "GET",
url: 'get_all_menu',

View File

@@ -429,16 +429,16 @@
</div>
<!-- pdf light box -->
<div class="modal fade" id="pdfModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-md" role="document">
<div class="modal fade" id="pdfModal" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-md " role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
<h6 class="modal-title">
<span id="pdfModalLabel"></span>
<span id="changed_amount" class="p-l-120"></span>
</h4>
</h6>
</div>
<div class="modal-body">
<div class="modal-body" style="height: 400px;">
<input type="hidden" name="sale_receipt_no" id="sale_receipt_no">
<input type="hidden" name="filename" id="filename">
<input type="hidden" name="printer_name" id="printer_name">
@@ -681,8 +681,8 @@ var customer_name = "<%= @customer.name %>";
calculate_member_discount(sale_id);
}
$("#pdfModal").modal({show : true, backdrop : false, keyboard : false});
$("#pdfModal").on('shown.bs.modal', function () {
$('#pdfModal').focus() }).modal({show : true, backdrop : false, keyboard : false});
$.ajax({type: "POST",
url: "<%= origami_payment_cash_path %>",
data: "cash="+ cash + "&sale_id=" + sale_id + "&type=" + cashier_type,
@@ -1341,4 +1341,4 @@ var customer_name = "<%= @customer.name %>";
}
});
}
</script>
</script>

View File

@@ -20,11 +20,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