merge with august_spring

This commit is contained in:
Yan
2017-08-30 19:16:07 +06:30
41 changed files with 998 additions and 432 deletions

View File

@@ -76,6 +76,17 @@ class Settings::PromotionsController < ApplicationController
end
end
def find_item_instance
item = MenuItem.find_by_item_code(params[:item_code])
if item.nil?
product = Product.where("item_code = ?",params[:item_code]).pluck(:name,:item_code)
render json: product
else
menu_instance = MenuItemInstance.where("menu_item_id = ?",item.id).pluck(:item_instance_name,:item_instance_code)
render json: menu_instance
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_promotion