when delete item options to update in menu items
This commit is contained in:
0
Can't open membership server }
Normal file
0
Can't open membership server }
Normal file
@@ -55,7 +55,25 @@ class Settings::MenuItemOptionsController < ApplicationController
|
||||
# DELETE /settings/menu_item_options/1
|
||||
# DELETE /settings/menu_item_options/1.json
|
||||
def destroy
|
||||
@settings_menu_item_option.destroy
|
||||
item_option_id =@settings_menu_item_option.id
|
||||
item_option_id_string=""+item_option_id.to_s+""
|
||||
if @settings_menu_item_option.destroy
|
||||
menu_items =MenuItem.all
|
||||
menu_items.each do |item|
|
||||
if item.item_options.include?(item_option_id)
|
||||
item_update =item.item_options.reject { |i| i == item_option_id }
|
||||
item.item_code =item.item_code
|
||||
item.item_options =item_update
|
||||
item.save
|
||||
end
|
||||
if item.item_options.include?(item_option_id_string)
|
||||
item_update =item.item_options.reject { |i| i == item_option_id_string }
|
||||
item.item_code =item.item_code
|
||||
item.item_options =item_update
|
||||
item.save
|
||||
end
|
||||
end
|
||||
end
|
||||
flash[:notice] = 'Menu item option was successfully destroyed.'
|
||||
render :json => {:status=> "Success", :url => settings_menu_item_options_path }.to_json
|
||||
# respond_to do |format|
|
||||
|
||||
@@ -109,7 +109,6 @@ class Settings::SimpleMenuItemsController < ApplicationController
|
||||
@settings_menu_item.item_sets = sets
|
||||
end
|
||||
end
|
||||
|
||||
@settings_menu_item.menu_category_id = params[:menu_category_id]
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
application_path="#{File.expand_path("../..", __FILE__)}"
|
||||
directory application_path
|
||||
#environment ENV.fetch("RAILS_ENV") { "production" }
|
||||
environment "production"
|
||||
pidfile "#{application_path}/tmp/puma/pid"
|
||||
state_path "#{application_path}/tmp/puma/state"
|
||||
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||
port ENV.fetch("PORT") { 62158 }
|
||||
workers 2
|
||||
preload_app!
|
||||
# application_path="#{File.expand_path("../..", __FILE__)}"
|
||||
# directory application_path
|
||||
# #environment ENV.fetch("RAILS_ENV") { "production" }
|
||||
# environment "production"
|
||||
# pidfile "#{application_path}/tmp/puma/pid"
|
||||
# state_path "#{application_path}/tmp/puma/state"
|
||||
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||
# port ENV.fetch("PORT") { 62158 }
|
||||
# workers 2
|
||||
# preload_app!
|
||||
|
||||
@@ -209,19 +209,19 @@ queue_no_printer=PrintSetting.create({name: "Queue No", unique_code: "QueueNoPdf
|
||||
|
||||
zone = Zone.create({id:1, name: "H1", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||
|
||||
member_setting = MembershipSetting.create({membership_type:"paypar_url",gateway_url: "http://192.168.1.82:3001",merchant_account_id:"NskNY4j3YxEg6h1Fm9AE"})
|
||||
member_setting = MembershipSetting.create({membership_type:"paypar_url",gateway_url: "https://staging.membership.paymal.ws",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"})
|
||||
|
||||
member_actions= MembershipAction.create([{membership_type:"get_account_balance",is_active:1,gateway_url:"/api/membership_campaigns/get_correspond_account_data",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"redeem",is_active:1,gateway_url:"/api/membership_campaigns/redeem",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"create_membership_customer",is_active:1,gateway_url:"/api/generic_customer/create_membership_customer",merchant_account_id:"NskNY4j3YxEg6h1Fm9AE",auth_token:"rj0MJ0XI5GsKZehE"},
|
||||
{membership_type:"update_membership_customer",is_active:1,gateway_url:"/api/generic_customer/update_membership_customer",merchant_account_id:"NskNY4j3YxEg6h1Fm9AE",auth_token:"rj0MJ0XI5GsKZehE"},
|
||||
{membership_type:"create_membership_customer",is_active:1,gateway_url:"/api/generic_customer/create_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"update_membership_customer",is_active:1,gateway_url:"/api/generic_customer/update_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"get_all_member_group",is_active:1,gateway_url:"/api/member_group/get_all_member_group",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"rebate",is_active:1,gateway_url:"/api/membership_campaigns/rebate",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"get_all_member_account",is_active:1,gateway_url:"/api/generic_customer/get_member_data",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"get_member_transactions",is_active:1,gateway_url:"/api/generic_customer/get_membership_transactions",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"member_discount",is_active:1,gateway_url:"/api/membership_campaigns/discount",additional_parameter:{campaign_type_id:5},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"get_member_campaign",is_active:1,gateway_url:"/api/membership_campaigns/get_member_campaign",additional_parameter:{campaign_type_id:5},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"},
|
||||
{membership_type:"search_paypar_account_no",is_active:1,gateway_url:"/api/generic_customer/get_membership_customer_data",merchant_account_id:"NskNY4j3YxEg6h1Fm9AE",auth_token:"rj0MJ0XI5GsKZehE"}
|
||||
{membership_type:"search_paypar_account_no",is_active:1,gateway_url:"/api/generic_customer/get_membership_customer_data",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"pZBHXEFbGNj/G"}
|
||||
])
|
||||
|
||||
payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http://membership.paypar.ws"})
|
||||
|
||||
0
member_params,
Normal file
0
member_params,
Normal file
Reference in New Issue
Block a user