Merge branch 'adminbsb_material_ui'
This commit is contained in:
@@ -6,8 +6,8 @@ $(function() {
|
|||||||
|
|
||||||
//click menu sidebar menu category
|
//click menu sidebar menu category
|
||||||
$(".product").on("click", function(){
|
$(".product").on("click", function(){
|
||||||
var url = $(this).attr('data-ref');
|
// /var url = $(this).attr('data-ref');
|
||||||
show_product_list(url);
|
// /show_product_list(url);
|
||||||
});
|
});
|
||||||
//show menu item list when click menu category
|
//show menu item list when click menu category
|
||||||
function show_product_list(url_item){
|
function show_product_list(url_item){
|
||||||
@@ -24,6 +24,7 @@ $(function() {
|
|||||||
if (type ==-1 && modify_order == -1){
|
if (type ==-1 && modify_order == -1){
|
||||||
url_item = url_item
|
url_item = url_item
|
||||||
}
|
}
|
||||||
|
console.log(url_item)
|
||||||
//Start Ajax
|
//Start Ajax
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
@@ -502,6 +503,7 @@ $(function() {
|
|||||||
|
|
||||||
//click item row for add order
|
//click item row for add order
|
||||||
$(document).on('click', '.menu_item_box', function(event){
|
$(document).on('click', '.menu_item_box', function(event){
|
||||||
|
|
||||||
$('.attributes-list').empty();
|
$('.attributes-list').empty();
|
||||||
$('.options-list').empty();
|
$('.options-list').empty();
|
||||||
$('#modal_box_img').empty();
|
$('#modal_box_img').empty();
|
||||||
@@ -517,7 +519,6 @@ $(function() {
|
|||||||
$('.add_to_order').removeAttr('data-options');
|
$('.add_to_order').removeAttr('data-options');
|
||||||
|
|
||||||
$('#count').val(1);
|
$('#count').val(1);
|
||||||
|
|
||||||
change_qty_plus_minus("count","plus","minus");
|
change_qty_plus_minus("count","plus","minus");
|
||||||
|
|
||||||
// data = $(this).parent().children().children('.add_icon');
|
// data = $(this).parent().children().children('.add_icon');
|
||||||
|
|||||||
@@ -57,9 +57,15 @@ class MenuCategory < ApplicationRecord
|
|||||||
to = 24
|
to = 24
|
||||||
to = to * 3600 + to_t.min* 60 + to_t.sec
|
to = to * 3600 + to_t.min* 60 + to_t.sec
|
||||||
else
|
else
|
||||||
|
|
||||||
h += 24
|
h += 24
|
||||||
to = h*3600 + to_t.min* 60 + to_t.sec
|
to = h*3600 + to_t.min* 60 + to_t.sec
|
||||||
|
c = current_t.hour
|
||||||
|
if c < 12
|
||||||
|
|
||||||
|
c +=24
|
||||||
|
current = c*3600 + current_t.min* 60 + current_t.sec
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else # (after) noon
|
else # (after) noon
|
||||||
if h > 12
|
if h > 12
|
||||||
@@ -72,6 +78,7 @@ class MenuCategory < ApplicationRecord
|
|||||||
day = Date.today.wday
|
day = Date.today.wday
|
||||||
dayresult = menu.valid_days.include?(day.to_s)
|
dayresult = menu.valid_days.include?(day.to_s)
|
||||||
|
|
||||||
|
|
||||||
if current.between?(from, to) && menu.valid_days.include?(day.to_s)
|
if current.between?(from, to) && menu.valid_days.include?(day.to_s)
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
@@ -108,3 +115,7 @@ class MenuCategory < ApplicationRecord
|
|||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user