beta build
This commit is contained in:
@@ -12,11 +12,17 @@ namespace :employer_automation do
|
||||
desc "Employer Initialization Automation Test"
|
||||
# rake employer_automation:employer_initialize_test
|
||||
task employer_initialize_test: :environment do
|
||||
if (missing_keychain = Employer.missing_keychain_initialization).exists?
|
||||
missing_keychain = Employer.missing_keychain_initialization
|
||||
missing_plans = Employer.missing_plans_initialization
|
||||
missing_members = Employer.missing_members_initialization
|
||||
|
||||
if missing_keychain.exists?
|
||||
missing_keychain.map(&:sync_with_vhcs)
|
||||
elsif (missing_plans = Employer.missing_plans_initialization).exists?
|
||||
end
|
||||
if missing_plans.exists?
|
||||
missing_plans.map(&:sync_plans_with_vhcs)
|
||||
elsif (missing_members = Employer.missing_members_initialization).exists?
|
||||
end
|
||||
if missing_members.exists?
|
||||
missing_members.map(&:sync_members_with_vhcs)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -169,12 +169,30 @@ namespace :seed_tasks do
|
||||
# rake seed_tasks:build_carriers
|
||||
task build_carriers: :environment do
|
||||
puts "Importing Carriers"
|
||||
Carrier.create!(name: "Level360")
|
||||
end
|
||||
|
||||
desc "Build Initial Brokers"
|
||||
# rake seed_tasks:build_brokers
|
||||
task build_brokers: :environment do
|
||||
puts "Importing Brokers"
|
||||
puts "Creating Brokers and connecting to Employers"
|
||||
broker_employers = [
|
||||
{name: "Tom McSwain", pl_plan_keys: ["4", "5", "13", "16", "19", "21", "23", "33", "62", "65"]},
|
||||
{name: "Rus Clark", pl_plan_keys: ["66"]},
|
||||
{name: "Keven Locht", pl_plan_keys: ["54","69"]},
|
||||
{name: "Mike Carraway", pl_plan_keys: ["48","61"]},
|
||||
{name: "Brian Puckett", pl_plan_keys: ["57","59","68"]},
|
||||
{name: "Ethan Sale", pl_plan_keys: ["58"]},
|
||||
{name: "Todd Lawrence", pl_plan_keys: ["67"]},
|
||||
{name: "Brian Mercier", pl_plan_keys: ["51", "55", "60", "63"]},
|
||||
{name: "John Kern", pl_plan_keys: ["53"]}
|
||||
]
|
||||
level360 = Carrier.first
|
||||
broker_employers.each do |broker_map|
|
||||
new_broker = Broker.create!(name: broker_map[:name], carrier: level360)
|
||||
Employer.where(pl_plan_key: broker_map[:pl_plan_keys]).update_all(broker_id: new_broker.id)
|
||||
end
|
||||
# Broker.create!(name: "Tom McSwain", carrier: level360)
|
||||
end
|
||||
|
||||
desc "Build Initial Employers"
|
||||
|
||||
Reference in New Issue
Block a user