check is_available for menu sync
This commit is contained in:
@@ -32,7 +32,7 @@ $(function(){
|
||||
/*new customer UI func:*/
|
||||
|
||||
$(".reservation_type").on("click", function(){
|
||||
if($(this).val() == "Dine-in"){
|
||||
if(parseInt($(this).val()) == 0){
|
||||
$(".dining_type").show();
|
||||
$(".room_type").hide();
|
||||
}else{
|
||||
|
||||
@@ -7,6 +7,7 @@ json.valid_time_to menu.valid_time_to.strftime("%H:%M")
|
||||
|
||||
if (menu.menu_categories)
|
||||
json.categories menu.menu_categories do |category|
|
||||
if category.is_available
|
||||
json.id category.id
|
||||
json.code category.code
|
||||
json.order_by category.order_by
|
||||
@@ -23,3 +24,4 @@ if (menu.menu_categories)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Format for attributes json
|
||||
attr_format = []
|
||||
# Format for attributes json
|
||||
if item.is_available
|
||||
if item.item_attributes.count > 0
|
||||
item.item_attributes.each do|attr_id|
|
||||
menu_attr = MenuItemAttribute.find(attr_id)
|
||||
@@ -124,3 +125,4 @@ end
|
||||
# json.partial! 'api/restaurant/menu/menu_item', item: item
|
||||
# end
|
||||
# end
|
||||
end
|
||||
Reference in New Issue
Block a user