Compare commits
3 Commits
beta
..
b0d2dcdec9
| Author | SHA1 | Date | |
|---|---|---|---|
| b0d2dcdec9 | |||
| 8d881ab5f4 | |||
| 56009fa158 |
@@ -27,6 +27,8 @@ gem "stimulus-rails"
|
|||||||
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
||||||
gem "jbuilder"
|
gem "jbuilder"
|
||||||
|
|
||||||
|
gem "rack-cors"
|
||||||
|
|
||||||
# Use Redis adapter to run Action Cable in production
|
# Use Redis adapter to run Action Cable in production
|
||||||
# gem "redis", "~> 5.3"
|
# gem "redis", "~> 5.3"
|
||||||
|
|
||||||
|
|||||||
@@ -239,6 +239,9 @@ GEM
|
|||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
racc (1.8.1)
|
racc (1.8.1)
|
||||||
rack (3.2.6)
|
rack (3.2.6)
|
||||||
|
rack-cors (3.0.0)
|
||||||
|
logger
|
||||||
|
rack (>= 3.0.14)
|
||||||
rack-mini-profiler (4.0.1)
|
rack-mini-profiler (4.0.1)
|
||||||
rack (>= 1.2.0)
|
rack (>= 1.2.0)
|
||||||
rack-session (2.1.2)
|
rack-session (2.1.2)
|
||||||
@@ -437,6 +440,7 @@ DEPENDENCIES
|
|||||||
pry-rails
|
pry-rails
|
||||||
puma (~> 6.5)
|
puma (~> 6.5)
|
||||||
pundit
|
pundit
|
||||||
|
rack-cors
|
||||||
rack-mini-profiler
|
rack-mini-profiler
|
||||||
rails (~> 7.2)
|
rails (~> 7.2)
|
||||||
rails_icons
|
rails_icons
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
class AdminsController < ApplicationController
|
||||||
|
def new_web_user
|
||||||
|
@employers = Employer.active
|
||||||
|
@brokers = Broker.all
|
||||||
|
@carrier = Carrier.all
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
module Api
|
||||||
|
module V1
|
||||||
|
class WebIdCardsController < ApplicationController
|
||||||
|
|
||||||
|
def member_card
|
||||||
|
pb_entity_key = params[:id]
|
||||||
|
layout = params[:layout]
|
||||||
|
member = Member.find_by(pb_entity_key: pb_entity_key)
|
||||||
|
if member.present?
|
||||||
|
member_card = IdCardPrinterService::CardsGenerator.new(member.member_key, layout).call
|
||||||
|
|
||||||
|
send_data member_card.to_pdf,
|
||||||
|
filename: "#{member.name.gsub(", ", "_")}_digital_card_#{Date.today}.pdf",
|
||||||
|
type: "application/pdf",
|
||||||
|
disposition: 'inline'
|
||||||
|
else
|
||||||
|
render json: { error: "Member not found" }, status: :not_found
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def employer_cards
|
||||||
|
pl_plan_key = params[:id]
|
||||||
|
employer = Employer.find_by(pl_plan_key: pl_plan_key)
|
||||||
|
if employer.present?
|
||||||
|
employer_cards = IdCardPrinterService::CardsGenerator.new(employer.employer_member_keys, "FullPageCard", true).call
|
||||||
|
|
||||||
|
employer_cards.rewind
|
||||||
|
send_data employer_cards.sysread,
|
||||||
|
filename: "#{employer.name.parameterize(separator: "_")}_full_page_cards_#{Date.today}.zip",
|
||||||
|
type: 'application/zip',
|
||||||
|
disposition: 'inline'
|
||||||
|
else
|
||||||
|
render json: { error: "Employer not found" }, status: :not_found
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
include Pundit::Authorization
|
include Pundit::Authorization
|
||||||
before_action :authenticate_user!
|
# before_action :authenticate_user!
|
||||||
|
|
||||||
def after_sign_in_path_for(resource)
|
def after_sign_in_path_for(resource)
|
||||||
stored_location_for(resource) || dashboard_path
|
stored_location_for(resource) || dashboard_path
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ module IdCard
|
|||||||
|
|
||||||
def update_field_exceptions
|
def update_field_exceptions
|
||||||
field_exceptions_params = IdCard::FieldException.permitted_params(params)
|
field_exceptions_params = IdCard::FieldException.permitted_params(params)
|
||||||
|
puts field_exceptions_params
|
||||||
if @setup.update(field_exceptions_params)
|
if @setup.update(field_exceptions_params)
|
||||||
puts "sucess"
|
puts "sucess"
|
||||||
redirect_to employer_path(@setup.employer.slug), notice: 'ID Card Exceptions successfully updated.'
|
redirect_to employer_path(@setup.employer.slug), notice: 'ID Card Exceptions successfully updated.'
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class ProcessMemberCardDataJob < ApplicationJob
|
|||||||
end
|
end
|
||||||
|
|
||||||
if member.id_card_plan_id.present?
|
if member.id_card_plan_id.present?
|
||||||
member_card = IdCard::PrintData.find_by(pl_plan_key: member.pl_plan_key, plan_id: member.id_card_plan_id, primary_mb_member_key: nil).dup
|
member_card = IdCard::PrintData.find_by(pl_plan_key: member.pl_plan_key, plan_id: member.id_card_plan_id).dup
|
||||||
else
|
else
|
||||||
member_card = IdCard::PrintData.where(pl_plan_key: member.pl_plan_key, primary_mb_member_key: nil).first.dup
|
member_card = IdCard::PrintData.where(pl_plan_key: member.pl_plan_key, primary_mb_member_key: nil).first.dup
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class UpdateMemberJob < ApplicationJob
|
class UpdateMemberJob < ApplicationJob
|
||||||
queue_as :default
|
queue_as :default
|
||||||
|
|
||||||
def perform(pb_entity_key, employer_id, has_divisions = false, has_dental = false, vw_mb_member = {})
|
def perform(pb_entity_key, employer_id, has_divisions = false, has_dental = false, add_inactive = false, vw_mb_member = {})
|
||||||
|
|
||||||
unless vw_mb_member.present?
|
unless vw_mb_member.present?
|
||||||
vw_mb_member = Vhcs::VwmbMember.find_by(enrollee_type_value_id: 1, pb_entity_key: pb_entity_key).attributes.with_indifferent_access.slice(:mb_member_key, :pb_entity_key, :pl_plan_key, :family_id, :full_name_last_name_first, :social_security_number)
|
vw_mb_member = Vhcs::VwmbMember.find_by(enrollee_type_value_id: 1, pb_entity_key: pb_entity_key).attributes.with_indifferent_access.slice(:mb_member_key, :pb_entity_key, :pl_plan_key, :family_id, :full_name_last_name_first, :social_security_number)
|
||||||
@@ -11,6 +11,8 @@ class UpdateMemberJob < ApplicationJob
|
|||||||
INNER JOIN "PBProductAvailability" ON "PBProductAvailability"."PBProductKey" = "PBProduct"."PBProductKey"
|
INNER JOIN "PBProductAvailability" ON "PBProductAvailability"."PBProductKey" = "PBProduct"."PBProductKey"
|
||||||
INNER JOIN "PBProductParticipation" ON "PBProductParticipation"."PBProductAvailabilityKey" = "PBProductAvailability"."PBProductAvailabilityKey"
|
INNER JOIN "PBProductParticipation" ON "PBProductParticipation"."PBProductAvailabilityKey" = "PBProductAvailability"."PBProductAvailabilityKey"
|
||||||
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
|
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
|
||||||
|
').select('
|
||||||
|
"PBProduct".*, "PBProductParticipation"."InEffect" AS InEffectDate, "PBProductParticipation"."OutOfEffect" AS OutOfEffectDate
|
||||||
').where('
|
').where('
|
||||||
"PBCoveredEntities"."PBEntityKey" = ?
|
"PBCoveredEntities"."PBEntityKey" = ?
|
||||||
AND "PBProductParticipation"."InEffect" <= ?
|
AND "PBProductParticipation"."InEffect" <= ?
|
||||||
@@ -18,7 +20,9 @@ class UpdateMemberJob < ApplicationJob
|
|||||||
vw_mb_member[:pb_entity_key], 3.month.from_now , 1.day.ago
|
vw_mb_member[:pb_entity_key], 3.month.from_now , 1.day.ago
|
||||||
)
|
)
|
||||||
|
|
||||||
if pb_products.present? && vw_mb_member[:social_security_number].present?
|
pb_products, max_in_effect, max_out_effect = get_products_with_max_dates(vw_mb_member[:pb_entity_key])
|
||||||
|
|
||||||
|
if add_inactive || (pb_products.exists? && max_out_effect > 1.year.ago) # && vw_mb_member[:social_security_number].present?
|
||||||
member = Member.find_or_create_by(pb_entity_key: vw_mb_member[:pb_entity_key], employer_id: employer_id)
|
member = Member.find_or_create_by(pb_entity_key: vw_mb_member[:pb_entity_key], employer_id: employer_id)
|
||||||
member.name = vw_mb_member[:full_name_last_name_first].titleize
|
member.name = vw_mb_member[:full_name_last_name_first].titleize
|
||||||
member.mb_member_key = vw_mb_member[:mb_member_key]
|
member.mb_member_key = vw_mb_member[:mb_member_key]
|
||||||
@@ -26,60 +30,62 @@ class UpdateMemberJob < ApplicationJob
|
|||||||
member.pl_plan_key = vw_mb_member[:pl_plan_key]
|
member.pl_plan_key = vw_mb_member[:pl_plan_key]
|
||||||
|
|
||||||
card_display_name = Vhcs::PbEntity.find_by(pb_entity_key: member.pb_entity_key).full_name
|
card_display_name = Vhcs::PbEntity.find_by(pb_entity_key: member.pb_entity_key).full_name
|
||||||
member.id_card_display_name = card_display_name
|
member.id_card_display_name ||= card_display_name
|
||||||
|
|
||||||
if has_divisions
|
if max_in_effect <= 3.months.from_now && max_out_effect > 1.day.ago
|
||||||
division = Vhcs::PbEntity.joins('
|
|
||||||
INNER JOIN "PBAffiliation" ON "PBAffiliation"."ParentPBEntityKey" = "PBEntity"."PBEntityKey"
|
|
||||||
INNER JOIN "PBProductParticipation" ON "PBProductParticipation"."PBAffiliationKey" = "PBAffiliation"."PBAffiliationKey"
|
|
||||||
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
|
|
||||||
').find_by('
|
|
||||||
"PBCoveredEntities"."PBEntityKey" = ?
|
|
||||||
AND "PBProductParticipation"."OutOfEffect" > ?',
|
|
||||||
member.pb_entity_key, 1.day.ago
|
|
||||||
).last_name
|
|
||||||
member.division = division
|
|
||||||
end
|
|
||||||
|
|
||||||
if has_dental
|
if has_divisions
|
||||||
medical_pb_product_key = pb_products.where("ShortDescription LIKE ?", "%Medical%")&.first&.pb_product_key
|
division = Vhcs::PbEntity.joins('
|
||||||
dental_pb_product_key = pb_products.where("ShortDescription LIKE ?", "%Dental%")&.first&.pb_product_key
|
INNER JOIN "PBAffiliation" ON "PBAffiliation"."ParentPBEntityKey" = "PBEntity"."PBEntityKey"
|
||||||
# dental_pb_product_key = pb_products.where(short_description: "Dental")&.first&.pb_product_key
|
INNER JOIN "PBProductParticipation" ON "PBProductParticipation"."PBAffiliationKey" = "PBAffiliation"."PBAffiliationKey"
|
||||||
if dental_pb_product_key
|
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
|
||||||
member.dental_plan_key = dental_pb_product_key
|
').find_by('
|
||||||
|
"PBCoveredEntities"."PBEntityKey" = ?
|
||||||
coverage_class = Vhcs::GenLookupTables.joins('
|
AND "PBProductParticipation"."OutOfEffect" > ?',
|
||||||
INNER JOIN "PBProductParticipation" ON "PBProductParticipation"."CoverageTypeCode" = "GEN_LookupTables"."RecordID"
|
member.pb_entity_key, 1.day.ago
|
||||||
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
|
).last_name
|
||||||
INNER JOIN "PBProductAvailability" ON "PBProductAvailability"."PBProductAvailabilityKey" = "PBProductParticipation"."PBProductAvailabilityKey"
|
member.division = division
|
||||||
INNER JOIN "PBProduct" ON "PBProduct"."PBProductKey" = "PBProductAvailability"."PBProductKey"
|
|
||||||
').select('
|
|
||||||
"GEN_LookupTables".*, "PBProductParticipation"."InEffect" AS EffDate
|
|
||||||
').where('
|
|
||||||
"PBCoveredEntities"."PBEntityKey" = ?
|
|
||||||
AND "PBProductParticipation"."InEffect" <= ?
|
|
||||||
AND "PBProductParticipation"."OutOfEffect" > ?
|
|
||||||
AND "PBProduct"."PBProductKey" = ?',
|
|
||||||
member.pb_entity_key, 1.month.from_now, 1.day.ago, dental_pb_product_key
|
|
||||||
).order('EffDate DESC').first.short_desc
|
|
||||||
member.coverage_class = coverage_class
|
|
||||||
else
|
|
||||||
member.coverage_class = "NONE"
|
|
||||||
end
|
end
|
||||||
else
|
|
||||||
medical_pb_product_key = pb_products.first.pb_product_key
|
|
||||||
end
|
|
||||||
if medical_pb_product_key && plan = IdCard::Plan.find_by(pb_product_key: medical_pb_product_key)
|
|
||||||
member.id_card_plan = plan
|
|
||||||
end
|
|
||||||
member.dependents = get_dependent_names_by_sequence(member)
|
|
||||||
# if employer_members_update
|
|
||||||
# member
|
|
||||||
# else
|
|
||||||
|
|
||||||
# end
|
if has_dental
|
||||||
member.save!
|
medical_pb_product_key = pb_products.where("ShortDescription LIKE ?", "%Medical%")&.first&.pb_product_key
|
||||||
|
dental_pb_product_key = pb_products.where("ShortDescription LIKE ?", "%Dental%")&.first&.pb_product_key
|
||||||
|
# dental_pb_product_key = pb_products.where(short_description: "Dental")&.first&.pb_product_key
|
||||||
|
if dental_pb_product_key
|
||||||
|
member.dental_plan_key = dental_pb_product_key
|
||||||
|
|
||||||
|
coverage_class = Vhcs::GenLookupTables.joins('
|
||||||
|
INNER JOIN "PBProductParticipation" ON "PBProductParticipation"."CoverageTypeCode" = "GEN_LookupTables"."RecordID"
|
||||||
|
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
|
||||||
|
INNER JOIN "PBProductAvailability" ON "PBProductAvailability"."PBProductAvailabilityKey" = "PBProductParticipation"."PBProductAvailabilityKey"
|
||||||
|
INNER JOIN "PBProduct" ON "PBProduct"."PBProductKey" = "PBProductAvailability"."PBProductKey"
|
||||||
|
').select('
|
||||||
|
"GEN_LookupTables".*, "PBProductParticipation"."InEffect" AS EffDate
|
||||||
|
').where('
|
||||||
|
"PBCoveredEntities"."PBEntityKey" = ?
|
||||||
|
AND "PBProductParticipation"."InEffect" <= ?
|
||||||
|
AND "PBProductParticipation"."OutOfEffect" > ?
|
||||||
|
AND "PBProduct"."PBProductKey" = ?',
|
||||||
|
member.pb_entity_key, 1.month.from_now, 1.day.ago, dental_pb_product_key
|
||||||
|
).order('EffDate DESC').first.short_desc
|
||||||
|
member.coverage_class = coverage_class
|
||||||
|
else
|
||||||
|
member.coverage_class = "NONE"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
medical_pb_product_key = pb_products.first.pb_product_key
|
||||||
|
end
|
||||||
|
if medical_pb_product_key && plan = IdCard::Plan.find_by(pb_product_key: medical_pb_product_key)
|
||||||
|
member.id_card_plan = plan
|
||||||
|
end
|
||||||
|
member.dependents = get_dependent_names_by_sequence(member)
|
||||||
|
|
||||||
|
member.active = true
|
||||||
|
else
|
||||||
|
member.active = false
|
||||||
|
end
|
||||||
puts "---- #{member.name}"
|
puts "---- #{member.name}"
|
||||||
|
member.save!
|
||||||
end
|
end
|
||||||
member.presence
|
member.presence
|
||||||
|
|
||||||
@@ -87,6 +93,21 @@ class UpdateMemberJob < ApplicationJob
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def get_products_with_max_dates(pb_entity_key)
|
||||||
|
pb_product_with_dates = Vhcs::PbProduct.joins('
|
||||||
|
INNER JOIN "PBProductAvailability" ON "PBProductAvailability"."PBProductKey" = "PBProduct"."PBProductKey"
|
||||||
|
INNER JOIN "PBProductParticipation" ON "PBProductParticipation"."PBProductAvailabilityKey" = "PBProductAvailability"."PBProductAvailabilityKey"
|
||||||
|
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
|
||||||
|
').select('
|
||||||
|
"PBProduct".*, "PBProductParticipation"."InEffect" AS InEffectDate, "PBProductParticipation"."OutOfEffect" AS OutOfEffectDate
|
||||||
|
').where('
|
||||||
|
"PBCoveredEntities"."PBEntityKey" = ?',
|
||||||
|
pb_entity_key
|
||||||
|
)
|
||||||
|
|
||||||
|
[pb_product_with_dates, pb_product_with_dates.map { |products| products["InEffectDate"]}.max, pb_product_with_dates.map { |products| products["OutOfEffectDate"]}.max]
|
||||||
|
end
|
||||||
|
|
||||||
def get_dependent_names_by_sequence(member)
|
def get_dependent_names_by_sequence(member)
|
||||||
dependents = Vhcs::VwmbMember.joins('
|
dependents = Vhcs::VwmbMember.joins('
|
||||||
INNER JOIN "PBCoveredEntities" ON "PBCoveredEntities"."PBEntityKey" = "vwMBMember"."PBEntityKey"
|
INNER JOIN "PBCoveredEntities" ON "PBCoveredEntities"."PBEntityKey" = "vwMBMember"."PBEntityKey"
|
||||||
|
|||||||
@@ -25,10 +25,12 @@ module IdCard
|
|||||||
def permitted_params(params)
|
def permitted_params(params)
|
||||||
params.require(:id_card_setup).permit(
|
params.require(:id_card_setup).permit(
|
||||||
field_exceptions_attributes: [
|
field_exceptions_attributes: [
|
||||||
|
:id,
|
||||||
:exception_type,
|
:exception_type,
|
||||||
:exception_values,
|
:exception_values,
|
||||||
:_destroy,
|
:_destroy,
|
||||||
field_exception_items_attributes: [
|
field_exception_items_attributes: [
|
||||||
|
:id,
|
||||||
:field_name,
|
:field_name,
|
||||||
:field_value,
|
:field_value,
|
||||||
:network_logo_id,
|
:network_logo_id,
|
||||||
|
|||||||
+14
-3
@@ -11,16 +11,27 @@ class Member < ApplicationRecord
|
|||||||
validates :division, presence: true, if: -> { employer.id_card_setup.has_divisions }
|
validates :division, presence: true, if: -> { employer.id_card_setup.has_divisions }
|
||||||
# validates :coverage_class, :dental_plan_key, presence: true, if: -> { employer.id_card_setup.has_dental }
|
# validates :coverage_class, :dental_plan_key, presence: true, if: -> { employer.id_card_setup.has_dental }
|
||||||
validates :mb_member_key, :pb_entity_key, uniqueness: true
|
validates :mb_member_key, :pb_entity_key, uniqueness: true
|
||||||
validates :name, uniqueness: { scope: :employer_id }
|
# validates :name, uniqueness: { scope: :employer_id }
|
||||||
|
|
||||||
before_validation :format_dependents, if: :dependents_changed?
|
before_validation :format_dependents, if: :dependents_changed?
|
||||||
|
|
||||||
|
scope :active, -> {
|
||||||
|
where(active: true)
|
||||||
|
}
|
||||||
|
|
||||||
def id_card_field_exception_values
|
def id_card_field_exception_values
|
||||||
address = Vhcs::PbEntityAddress.find_by(pb_entity_key: self.pb_entity_key)
|
address = Vhcs::PbEntityAddress.find_by(pb_entity_key: pb_entity_key)
|
||||||
{
|
{
|
||||||
zipcode: address.zip,
|
zipcode: address.zip,
|
||||||
state: address.state,
|
state: address.state,
|
||||||
family_id: self.family_id
|
family_id: family_id
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
def member_key
|
||||||
|
{
|
||||||
|
pl_plan_key: pl_plan_key,
|
||||||
|
member_keys: [pb_entity_key]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -12,17 +12,21 @@ module AutomationService
|
|||||||
|
|
||||||
vw_mb_members = Vhcs::VwmbMember.where(enrollee_type_value_id: 1, pl_plan_key: @pl_plan_key).select(:mb_member_key, :pb_entity_key, :pl_plan_key, :family_id, :full_name_last_name_first, :social_security_number)
|
vw_mb_members = Vhcs::VwmbMember.where(enrollee_type_value_id: 1, pl_plan_key: @pl_plan_key).select(:mb_member_key, :pb_entity_key, :pl_plan_key, :family_id, :full_name_last_name_first, :social_security_number)
|
||||||
|
|
||||||
|
puts "--- Total Members #{vw_mb_members.length}"
|
||||||
|
|
||||||
member_update_futures = vw_mb_members.map do |vw_mb_member|
|
member_update_futures = vw_mb_members.map do |vw_mb_member|
|
||||||
Concurrent::Future.execute do
|
Concurrent::Future.execute do
|
||||||
ActiveRecord::Base.connection_pool.with_connection do
|
ActiveRecord::Base.connection_pool.with_connection do
|
||||||
UpdateMemberJob.perform_now(vw_mb_member.pb_entity_key, employer.id, card_setup.has_divisions, card_setup.has_dental, vw_mb_member)
|
UpdateMemberJob.perform_now(vw_mb_member.pb_entity_key, employer.id, card_setup.has_divisions, card_setup.has_dental, false, vw_mb_member)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
member_updates = member_update_futures.map(&:value).compact
|
member_updates = member_update_futures.map(&:value).compact
|
||||||
employer.members = member_updates
|
|
||||||
if employer.initialized && card_setup.initialized && member_updates.empty?
|
puts "--- Total Web Members #{member_updates.length}"
|
||||||
|
# employer.members = member_updates
|
||||||
|
if employer.initialized && card_setup.initialized && employer.members.active.empty?
|
||||||
employer.active = false
|
employer.active = false
|
||||||
end
|
end
|
||||||
employer.save
|
employer.save
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ module AutomationService
|
|||||||
def call
|
def call
|
||||||
employer = Employer.includes(:id_card_setup).find_by(pl_plan_key: @pl_plan_key)
|
employer = Employer.includes(:id_card_setup).find_by(pl_plan_key: @pl_plan_key)
|
||||||
card_setup = employer.id_card_setup
|
card_setup = employer.id_card_setup
|
||||||
member = UpdateMemberJob.perform_now(@pb_entity_key, employer.id, card_setup.has_divisions, card_setup.has_dental)
|
member = UpdateMemberJob.perform_now(@pb_entity_key, employer.id, card_setup.has_divisions, card_setup.has_dental, true)
|
||||||
if member.present?
|
# if member.present?
|
||||||
member.save
|
# member.save
|
||||||
else
|
# else
|
||||||
Member.find_by(pb_entity_key: @pb_entity_key).destroy
|
# Member.find_by(pb_entity_key: @pb_entity_key).destroy
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -57,22 +57,24 @@ module IdCardPrinterService
|
|||||||
)
|
)
|
||||||
|
|
||||||
selected_attributes = employer_attributes.merge(rx_attributes).merge(provider_attributes)
|
selected_attributes = employer_attributes.merge(rx_attributes).merge(provider_attributes)
|
||||||
IdCard::PrintData.new(selected_attributes)
|
IdCard::PrintData.create(selected_attributes)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_plan_base_cards(common_fields_card)
|
def create_plan_base_cards(common_fields_card)
|
||||||
needed_plans_ids = @employer.members.where(pb_entity_key: @member_keys).distinct.pluck(:id_card_plan_id)
|
needed_plans_ids = @employer.members.where(pb_entity_key: @member_keys).distinct.pluck(:id_card_plan_id)
|
||||||
needed_plans = @card_setup.plans.where(id: needed_plans_ids)
|
if needed_plans_ids.present?
|
||||||
needed_plans.each do |plan|
|
needed_plans = @card_setup.plans.where(id: needed_plans_ids)
|
||||||
selected_attributes = { plan_id: plan.id }
|
needed_plans.each do |plan|
|
||||||
plan.plan_benefits.each do |bene|
|
selected_attributes = { plan_id: plan.id }
|
||||||
selected_attributes["benefit_desc_#{bene.sequence}".to_sym] = bene.benefit_desc
|
plan.plan_benefits.each do |bene|
|
||||||
selected_attributes["benefit_#{bene.sequence}".to_sym] = bene.benefit
|
selected_attributes["benefit_desc_#{bene.sequence}".to_sym] = bene.benefit_desc
|
||||||
end
|
selected_attributes["benefit_#{bene.sequence}".to_sym] = bene.benefit
|
||||||
|
end
|
||||||
|
|
||||||
plan_base_card = common_fields_card.dup
|
plan_base_card = common_fields_card.dup
|
||||||
plan_base_card.assign_attributes(selected_attributes)
|
plan_base_card.assign_attributes(selected_attributes)
|
||||||
plan_base_card.save
|
plan_base_card.save
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -3,23 +3,43 @@ module IdCardQueueService
|
|||||||
|
|
||||||
def initialize(pl_plan_keys = nil)
|
def initialize(pl_plan_keys = nil)
|
||||||
if pl_plan_keys
|
if pl_plan_keys
|
||||||
@employer_pl_plan_keys = pl_plan_keys
|
@employer_pl_plan_keys = Array.wrap(pl_plan_keys)
|
||||||
else
|
else
|
||||||
@employer_pl_plan_keys = IdCard::Setup.active.pluck(:pl_plan_key).join(',')
|
@employer_pl_plan_keys = IdCard::Setup.active.pluck(:pl_plan_key)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def call
|
def call
|
||||||
raw_employers_member_keys = CallStoredProc.new('HLGetQueuedIdCardMemberKeysTPA', { PLPlanKeys: @employer_pl_plan_keys }).call.to_ary
|
|
||||||
|
|
||||||
format_employers_member_keys(raw_employers_member_keys)
|
employer_member_keys = @employer_pl_plan_keys.map do |pl_plan_key|
|
||||||
|
queued_employer_members = Vhcs::VwmbMember.joins('
|
||||||
|
INNER JOIN "CLDocument" ON "CLDocument"."RecipientKey" = "VWMBMember"."MBMemberKey"
|
||||||
|
').select('
|
||||||
|
"VWMBMember"."PBEntityKey"
|
||||||
|
').where('
|
||||||
|
"CLDocument"."DocStatus" <> ?
|
||||||
|
AND "CLDocument"."PLPlanKey" = ?
|
||||||
|
AND "CLDocument"."PrintDate" IS NULL
|
||||||
|
AND "CLDocument"."CreateDate" > ?',
|
||||||
|
"Printed", pl_plan_key, Date.new(2026, 7, 17)
|
||||||
|
).pluck(:pb_entity_key)
|
||||||
|
|
||||||
|
if queued_employer_members.present?
|
||||||
|
{
|
||||||
|
pl_plan_key: pl_plan_key,
|
||||||
|
member_keys: queued_employer_members
|
||||||
|
}
|
||||||
|
else
|
||||||
|
""
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
employer_member_keys.compact_blank
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def format_employers_member_keys(raw_employers_member_keys)
|
def format_employers_member_keys(raw_employers_member_keys)
|
||||||
key_map = { "PlanKey" => :pl_plan_key, "MemberKeys" => :member_keys }
|
|
||||||
|
|
||||||
raw_employers_member_keys.map do |hash|
|
raw_employers_member_keys.map do |hash|
|
||||||
hash["PlanKey"] = hash["PlanKey"].to_s
|
hash["PlanKey"] = hash["PlanKey"].to_s
|
||||||
hash["MemberKeys"] = hash["MemberKeys"].split(", ").map(&:to_i)
|
hash["MemberKeys"] = hash["MemberKeys"].split(", ").map(&:to_i)
|
||||||
|
|||||||
Executable → Regular
@@ -49,6 +49,8 @@ module ReportsService
|
|||||||
UPDATE CLDocument
|
UPDATE CLDocument
|
||||||
SET DocStatus = 'Printed', PrintDate = GetDate()
|
SET DocStatus = 'Printed', PrintDate = GetDate()
|
||||||
where DocStatus <> 'Printed'
|
where DocStatus <> 'Printed'
|
||||||
|
and DocType = 'ID'
|
||||||
|
and CreateDate > CAST('2026-05-01' AS date)
|
||||||
")
|
")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<div
|
||||||
|
class="min-h-full flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8"
|
||||||
|
>
|
||||||
|
<div class="max-w-md w-full space-y-8">
|
||||||
|
<h2 class="mt-10 text-center text-2xl font-extrabold text-[#CD7F32]">
|
||||||
|
Add Invited Web Account
|
||||||
|
</h2>
|
||||||
|
<%= form_with url: create_web_employer_admins_path, method: :post, local: true do |f| %>
|
||||||
|
<div class="mt-8 space-y-6">
|
||||||
|
Employers
|
||||||
|
<div class="rounded-md shadow-sm -space-y-px">
|
||||||
|
<div>
|
||||||
|
<%= f.label :employer %>
|
||||||
|
<%= f.collection_select :employer, @employers, :id, :name, { include_blank: "Select an Employer" }, { class: "custom-select" } %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<%= f.label :email %>
|
||||||
|
<%= f.email_field :email, id: "email-address", autofocus: true, autocomplete: "email", placeholder: "Email address", class: "appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-bluetang text-deepcove rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<%= f.submit "Create Employer Account", { class: "relative w-full flex justify-center py-2 px-4 border-4 font-bold rounded-lg text-platinum" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<%= form_with url: create_web_broker_admins_path, method: :post, local: true do |f| %>
|
||||||
|
<div class="mt-8 space-y-6">
|
||||||
|
Brokers
|
||||||
|
<div class="rounded-md shadow-sm -space-y-px">
|
||||||
|
<div>
|
||||||
|
<%= f.label :broker %>
|
||||||
|
<%= f.collection_select :broker, @brokers, :id, :name, { include_blank: "Select a Broker" }, { class: "custom-select" } %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<%= f.label :email %>
|
||||||
|
<%= f.email_field :email, id: "email-address", autofocus: true, autocomplete: "email", placeholder: "Email address", class: "appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-bluetang text-deepcove rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<%= f.submit "Create Broker Account", { class: "relative w-full flex justify-center py-2 px-4 border-4 font-bold rounded-lg text-platinum" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<%= form_with url: create_web_carrier_admins_path, method: :post, local: true do |f| %>
|
||||||
|
<div class="mt-8 space-y-6">
|
||||||
|
Carriers
|
||||||
|
<div class="rounded-md shadow-sm -space-y-px">
|
||||||
|
<div>
|
||||||
|
<%= f.label :carrier %>
|
||||||
|
<%= f.collection_select :carrier, @carriers, :id, :name, { include_blank: "Select a Broker" }, { class: "custom-select" } %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<%= f.label :email %>
|
||||||
|
<%= f.email_field :email, id: "email-address", autofocus: true, autocomplete: "email", placeholder: "Email address", class: "appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-bluetang text-deepcove rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<%= f.submit "Create Carrier Account", { class: "relative w-full flex justify-center py-2 px-4 border-4 font-bold rounded-lg text-platinum" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<div id="<%= dom_id broker %>" class="w-full sm:w-auto my-5 space-y-5">
|
||||||
|
<div>
|
||||||
|
<strong class="block font-medium mb-1">Name:</strong>
|
||||||
|
<%= broker.name %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong class="block font-medium mb-1">Carrier:</strong>
|
||||||
|
<%= broker.carrier_id %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
json.extract! broker, :id, :name, :carrier_id, :created_at, :updated_at
|
||||||
|
json.url broker_url(broker, format: :json)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<%= form_with(model: broker, class: "contents") do |form| %>
|
||||||
|
<% if broker.errors.any? %>
|
||||||
|
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
|
||||||
|
<h2><%= pluralize(broker.errors.count, "error") %> prohibited this broker from being saved:</h2>
|
||||||
|
|
||||||
|
<ul class="list-disc ml-6">
|
||||||
|
<% broker.errors.each do |error| %>
|
||||||
|
<li><%= error.full_message %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="my-5">
|
||||||
|
<%= form.label :name %>
|
||||||
|
<%= form.text_field :name, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": broker.errors[:name].none?, "border-red-400 focus:outline-red-600": broker.errors[:name].any?}] %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="my-5">
|
||||||
|
<%= form.label :carrier_id %>
|
||||||
|
<%= form.text_field :carrier_id, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": broker.errors[:carrier_id].none?, "border-red-400 focus:outline-red-600": broker.errors[:carrier_id].any?}] %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inline">
|
||||||
|
<%= form.submit class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<% content_for :title, "Editing broker" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<h1 class="font-bold text-4xl">Editing broker</h1>
|
||||||
|
|
||||||
|
<%= render "form", broker: @broker %>
|
||||||
|
|
||||||
|
<%= link_to "Show this broker", @broker, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Back to brokers", brokers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<% content_for :title, "Brokers" %>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<% if notice.present? %>
|
||||||
|
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="flex justify-between items-center">
|
||||||
|
<h1 class="font-bold text-4xl">Brokers</h1>
|
||||||
|
<%= link_to "New broker", new_broker_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="brokers" class="min-w-full divide-y divide-gray-200 space-y-5">
|
||||||
|
<% if @brokers.any? %>
|
||||||
|
<% @brokers.each do |broker| %>
|
||||||
|
<div class="flex flex-col sm:flex-row justify-between items-center pb-5 sm:pb-0">
|
||||||
|
<%= render broker %>
|
||||||
|
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-x-2 space-y-2">
|
||||||
|
<%= link_to "Show", broker, class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Edit", edit_broker_path(broker), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= button_to "Destroy", broker, method: :delete, class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<p class="text-center my-10">No brokers found.</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
json.array! @brokers, partial: "brokers/broker", as: :broker
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<% content_for :title, "New broker" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<h1 class="font-bold text-4xl">New broker</h1>
|
||||||
|
|
||||||
|
<%= render "form", broker: @broker %>
|
||||||
|
|
||||||
|
<%= link_to "Back to brokers", brokers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<% content_for :title, "Showing broker" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<% if notice.present? %>
|
||||||
|
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<h1 class="font-bold text-4xl">Showing broker</h1>
|
||||||
|
|
||||||
|
<%= render @broker %>
|
||||||
|
|
||||||
|
<%= link_to "Edit this broker", edit_broker_path(@broker), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Back to brokers", brokers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= button_to "Destroy this broker", @broker, method: :delete, form_class: "sm:inline-block mt-2 sm:mt-0 sm:ml-2", class: "w-full rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
json.partial! "brokers/broker", broker: @broker
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<div id="<%= dom_id carrier %>" class="w-full sm:w-auto my-5 space-y-5">
|
||||||
|
<div>
|
||||||
|
<strong class="block font-medium mb-1">Name:</strong>
|
||||||
|
<%= carrier.name %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
json.extract! carrier, :id, :name, :created_at, :updated_at
|
||||||
|
json.url carrier_url(carrier, format: :json)
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<%= form_with(model: carrier, class: "contents") do |form| %>
|
||||||
|
<% if carrier.errors.any? %>
|
||||||
|
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
|
||||||
|
<h2><%= pluralize(carrier.errors.count, "error") %> prohibited this carrier from being saved:</h2>
|
||||||
|
|
||||||
|
<ul class="list-disc ml-6">
|
||||||
|
<% carrier.errors.each do |error| %>
|
||||||
|
<li><%= error.full_message %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="my-5">
|
||||||
|
<%= form.label :name %>
|
||||||
|
<%= form.text_field :name, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": carrier.errors[:name].none?, "border-red-400 focus:outline-red-600": carrier.errors[:name].any?}] %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inline">
|
||||||
|
<%= form.submit class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<% content_for :title, "Editing carrier" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<h1 class="font-bold text-4xl">Editing carrier</h1>
|
||||||
|
|
||||||
|
<%= render "form", carrier: @carrier %>
|
||||||
|
|
||||||
|
<%= link_to "Show this carrier", @carrier, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Back to carriers", carriers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<% content_for :title, "Carriers" %>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<% if notice.present? %>
|
||||||
|
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="flex justify-between items-center">
|
||||||
|
<h1 class="font-bold text-4xl">Carriers</h1>
|
||||||
|
<%= link_to "New carrier", new_carrier_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="carriers" class="min-w-full divide-y divide-gray-200 space-y-5">
|
||||||
|
<% if @carriers.any? %>
|
||||||
|
<% @carriers.each do |carrier| %>
|
||||||
|
<div class="flex flex-col sm:flex-row justify-between items-center pb-5 sm:pb-0">
|
||||||
|
<%= render carrier %>
|
||||||
|
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-x-2 space-y-2">
|
||||||
|
<%= link_to "Show", carrier, class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Edit", edit_carrier_path(carrier), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= button_to "Destroy", carrier, method: :delete, class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<p class="text-center my-10">No carriers found.</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
json.array! @carriers, partial: "carriers/carrier", as: :carrier
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<% content_for :title, "New carrier" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<h1 class="font-bold text-4xl">New carrier</h1>
|
||||||
|
|
||||||
|
<%= render "form", carrier: @carrier %>
|
||||||
|
|
||||||
|
<%= link_to "Back to carriers", carriers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<% content_for :title, "Showing carrier" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<% if notice.present? %>
|
||||||
|
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<h1 class="font-bold text-4xl">Showing carrier</h1>
|
||||||
|
|
||||||
|
<%= render @carrier %>
|
||||||
|
|
||||||
|
<%= link_to "Edit this carrier", edit_carrier_path(@carrier), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Back to carriers", carriers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= button_to "Destroy this carrier", @carrier, method: :delete, form_class: "sm:inline-block mt-2 sm:mt-0 sm:ml-2", class: "w-full rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
json.partial! "carriers/carrier", carrier: @carrier
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= button_tag "Add Another Alternate ID Card Change Item", class: "cursor-pointer bg-#{IdCard::Setup::FORM_COLORS[index]} hover:bg-deepcove text-xl font-bold text-platinum my-3 py-1 font-semibold leading-tight rounded border-3 border-#{IdCard::Setup::FORM_COLORS[index]} w-full", data: { action: "add-exception-item#addExemptionItem", add_exception_item_target: "exceptionItemButton" } %>
|
<%= button_tag "Add Alternate ID Card Change Item", class: "cursor-pointer bg-#{IdCard::Setup::FORM_COLORS[index]} hover:bg-deepcove text-xl font-bold text-platinum my-3 py-1 font-semibold leading-tight rounded border-3 border-#{IdCard::Setup::FORM_COLORS[index]} w-full", data: { action: "add-exception-item#addExemptionItem", add_exception_item_target: "exceptionItemButton" } %>
|
||||||
<template data-add-exception-item-target="exceptionItemTemplate">
|
<template data-add-exception-item-target="exceptionItemTemplate">
|
||||||
<%= exception_fields.fields_for :field_exception_items, IdCard::FieldExceptionItem.new, child_index: 'NEW_ITEM_RECORD' do |exception_item_fields| %>
|
<%= exception_fields.fields_for :field_exception_items, IdCard::FieldExceptionItem.new, child_index: 'NEW_ITEM_RECORD' do |exception_item_fields| %>
|
||||||
<div class="flex justify-between items-start w-full" data-controller="exceptions-toggle">
|
<div class="flex justify-between items-start w-full" data-controller="exceptions-toggle">
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<%= form_with(model: provider_group, class: "contents") do |form| %>
|
||||||
|
<% if provider_group.errors.any? %>
|
||||||
|
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
|
||||||
|
<h2><%= pluralize(provider_group.errors.count, "error") %> prohibited this provider_group from being saved:</h2>
|
||||||
|
|
||||||
|
<ul class="list-disc ml-6">
|
||||||
|
<% provider_group.errors.each do |error| %>
|
||||||
|
<li><%= error.full_message %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="my-5">
|
||||||
|
<%= form.label :name %>
|
||||||
|
<%= form.text_field :name, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": provider_group.errors[:name].none?, "border-red-400 focus:outline-red-600": provider_group.errors[:name].any?}] %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inline">
|
||||||
|
<%= form.submit class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<div id="<%= dom_id provider_group %>" class="w-full sm:w-auto my-5 space-y-5">
|
||||||
|
<div>
|
||||||
|
<strong class="block font-medium mb-1">Name:</strong>
|
||||||
|
<%= provider_group.name %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
json.extract! provider_group, :id, :name, :created_at, :updated_at
|
||||||
|
json.url provider_group_url(provider_group, format: :json)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<% content_for :title, "Editing provider group" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<h1 class="font-bold text-4xl">Editing provider group</h1>
|
||||||
|
|
||||||
|
<%= render "form", provider_group: @provider_group %>
|
||||||
|
|
||||||
|
<%= link_to "Show this provider group", @provider_group, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Back to provider groups", provider_groups_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<% content_for :title, "Provider groups" %>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<% if notice.present? %>
|
||||||
|
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="flex justify-between items-center">
|
||||||
|
<h1 class="font-bold text-4xl">Provider groups</h1>
|
||||||
|
<%= link_to "New provider group", new_provider_group_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="provider_groups" class="min-w-full divide-y divide-gray-200 space-y-5">
|
||||||
|
<% if @provider_groups.any? %>
|
||||||
|
<% @provider_groups.each do |provider_group| %>
|
||||||
|
<div class="flex flex-col sm:flex-row justify-between items-center pb-5 sm:pb-0">
|
||||||
|
<%= render provider_group %>
|
||||||
|
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-x-2 space-y-2">
|
||||||
|
<%= link_to "Show", provider_group, class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Edit", edit_provider_group_path(provider_group), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= button_to "Destroy", provider_group, method: :delete, class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<p class="text-center my-10">No provider groups found.</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
json.array! @provider_groups, partial: "provider_groups/provider_group", as: :provider_group
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<% content_for :title, "New provider group" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<h1 class="font-bold text-4xl">New provider group</h1>
|
||||||
|
|
||||||
|
<%= render "form", provider_group: @provider_group %>
|
||||||
|
|
||||||
|
<%= link_to "Back to provider groups", provider_groups_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<% content_for :title, "Showing provider group" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<% if notice.present? %>
|
||||||
|
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<h1 class="font-bold text-4xl">Showing provider group</h1>
|
||||||
|
|
||||||
|
<%= render @provider_group %>
|
||||||
|
|
||||||
|
<%= link_to "Edit this provider group", edit_provider_group_path(@provider_group), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Back to provider groups", provider_groups_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= button_to "Destroy this provider group", @provider_group, method: :delete, form_class: "sm:inline-block mt-2 sm:mt-0 sm:ml-2", class: "w-full rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
json.partial! "provider_groups/provider_group", provider_group: @provider_group
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<%= form_with(model: provider, class: "contents") do |form| %>
|
||||||
|
<% if provider.errors.any? %>
|
||||||
|
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
|
||||||
|
<h2><%= pluralize(provider.errors.count, "error") %> prohibited this provider from being saved:</h2>
|
||||||
|
|
||||||
|
<ul class="list-disc ml-6">
|
||||||
|
<% provider.errors.each do |error| %>
|
||||||
|
<li><%= error.full_message %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="inline">
|
||||||
|
<%= form.submit class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<div id="<%= dom_id provider %>" class="w-full sm:w-auto my-5 space-y-5">
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
json.extract! provider, :id, :created_at, :updated_at
|
||||||
|
json.url provider_url(provider, format: :json)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<% content_for :title, "Editing provider" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<h1 class="font-bold text-4xl">Editing provider</h1>
|
||||||
|
|
||||||
|
<%= render "form", provider: @provider %>
|
||||||
|
|
||||||
|
<%= link_to "Show this provider", @provider, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Back to providers", providers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<% content_for :title, "Providers" %>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<% if notice.present? %>
|
||||||
|
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="flex justify-between items-center">
|
||||||
|
<h1 class="font-bold text-4xl">Providers</h1>
|
||||||
|
<%= link_to "New provider", new_provider_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="providers" class="min-w-full divide-y divide-gray-200 space-y-5">
|
||||||
|
<% if @providers.any? %>
|
||||||
|
<% @providers.each do |provider| %>
|
||||||
|
<div class="flex flex-col sm:flex-row justify-between items-center pb-5 sm:pb-0">
|
||||||
|
<%= render provider %>
|
||||||
|
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-x-2 space-y-2">
|
||||||
|
<%= link_to "Show", provider, class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Edit", edit_provider_path(provider), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= button_to "Destroy", provider, method: :delete, class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<p class="text-center my-10">No providers found.</p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
json.array! @providers, partial: "providers/provider", as: :provider
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<% content_for :title, "New provider" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<h1 class="font-bold text-4xl">New provider</h1>
|
||||||
|
|
||||||
|
<%= render "form", provider: @provider %>
|
||||||
|
|
||||||
|
<%= link_to "Back to providers", providers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<% content_for :title, "Showing provider" %>
|
||||||
|
|
||||||
|
<div class="md:w-2/3 w-full">
|
||||||
|
<% if notice.present? %>
|
||||||
|
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<h1 class="font-bold text-4xl">Showing provider</h1>
|
||||||
|
|
||||||
|
<%= render @provider %>
|
||||||
|
|
||||||
|
<%= link_to "Edit this provider", edit_provider_path(@provider), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= link_to "Back to providers", providers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
|
||||||
|
<%= button_to "Destroy this provider", @provider, method: :delete, form_class: "sm:inline-block mt-2 sm:mt-0 sm:ml-2", class: "w-full rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
json.partial! "providers/provider", provider: @provider
|
||||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -20,6 +20,8 @@ Rails.application.configure do
|
|||||||
# Enable server timing.
|
# Enable server timing.
|
||||||
config.server_timing = true
|
config.server_timing = true
|
||||||
|
|
||||||
|
config.hosts << "baclight"
|
||||||
|
|
||||||
# Enable/disable caching. By default caching is disabled.
|
# Enable/disable caching. By default caching is disabled.
|
||||||
# Run rails dev:cache to toggle caching.
|
# Run rails dev:cache to toggle caching.
|
||||||
if Rails.root.join("tmp/caching-dev.txt").exist?
|
if Rails.root.join("tmp/caching-dev.txt").exist?
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Avoid CORS issues when API is called from the frontend app.
|
||||||
|
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests.
|
||||||
|
|
||||||
|
# Read more: https://github.com/cyu/rack-cors
|
||||||
|
|
||||||
|
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
||||||
|
allow do
|
||||||
|
origins "*"
|
||||||
|
|
||||||
|
resource "*",
|
||||||
|
headers: :any,
|
||||||
|
methods: [ :get, :post, :put, :patch, :delete, :options, :head ]
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -70,6 +70,26 @@ Rails.application.routes.draw do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
resources :admins do
|
||||||
|
collection do
|
||||||
|
get 'new_web_user'
|
||||||
|
post 'create_web_employer'
|
||||||
|
post 'create_web_broker'
|
||||||
|
post 'create_web_carrier'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
namespace :api do
|
||||||
|
namespace :v1 do
|
||||||
|
# resources :web_id_cards, controller: "web_id_cards", only: [] do
|
||||||
|
# get '', action: :member_card, as: :web_member_card
|
||||||
|
# get '', action: :employer_cards, as: :web_employer_cards
|
||||||
|
# end
|
||||||
|
get 'web_id_cards/member_card/:id/:layout', to: 'web_id_cards#member_card'
|
||||||
|
get 'web_id_cards/employer_cards/:id', to: 'web_id_cards#employer_cards'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
|
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
|
||||||
# Can be used by load balancers and uptime monitors to verify that the app is live.
|
# Can be used by load balancers and uptime monitors to verify that the app is live.
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class AddActiveStatusToMember < ActiveRecord::Migration[7.2]
|
||||||
|
def change
|
||||||
|
add_column :members, :active, :boolean
|
||||||
|
end
|
||||||
|
end
|
||||||
+2
-1
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.2].define(version: 2026_05_13_162029) do
|
ActiveRecord::Schema[7.2].define(version: 2026_06_29_133740) do
|
||||||
create_table "brokers", force: :cascade do |t|
|
create_table "brokers", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.bigint "carrier_id"
|
t.bigint "carrier_id"
|
||||||
@@ -307,6 +307,7 @@ ActiveRecord::Schema[7.2].define(version: 2026_05_13_162029) do
|
|||||||
t.bigint "id_card_plan_id"
|
t.bigint "id_card_plan_id"
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
t.boolean "active"
|
||||||
t.index ["employer_id"], name: "index_members_on_employer_id"
|
t.index ["employer_id"], name: "index_members_on_employer_id"
|
||||||
t.index ["id_card_plan_id"], name: "index_members_on_id_card_plan_id"
|
t.index ["id_card_plan_id"], name: "index_members_on_id_card_plan_id"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
services:
|
|
||||||
web:
|
|
||||||
build:
|
|
||||||
context: ./
|
|
||||||
dockerfile: development.Dockerfile
|
|
||||||
command: bash -c "rm -f tmp/pids/server.pid && bin/dev"
|
|
||||||
volumes:
|
|
||||||
- .:/usr/src/app
|
|
||||||
- bundle:/usr/local/bundle
|
|
||||||
ports:
|
|
||||||
- "3002:3002"
|
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
environment:
|
|
||||||
- HISTFILE=/usr/src/app/log/.bash_history
|
|
||||||
- RAILS_ENV=development
|
|
||||||
- TAILWIND_POLLING=true
|
|
||||||
- PUID=1000
|
|
||||||
- PGID=100
|
|
||||||
tty: true
|
|
||||||
stdin_open: true
|
|
||||||
# healthcheck:
|
|
||||||
# test: ["CMD", "curl", "-f", "http://localhost:3002/up"]
|
|
||||||
# interval: 5s
|
|
||||||
# timeout: 3s
|
|
||||||
# retries: 10
|
|
||||||
# start_period: 10s
|
|
||||||
# depends_on:
|
|
||||||
# db:
|
|
||||||
# condition: service_healthy
|
|
||||||
# db:
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: Dockerfile.db
|
|
||||||
# volumes:
|
|
||||||
# - ./mssql-data:/var/opt/mssql
|
|
||||||
# ports:
|
|
||||||
# - "1434:1434"
|
|
||||||
# healthcheck:
|
|
||||||
# test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-Usa", "-PBr1tt0nPassw0rd", "-Q", "select 1"]
|
|
||||||
# interval: 10s
|
|
||||||
# timeout: 3s
|
|
||||||
# retries: 10
|
|
||||||
# start_period: 10s
|
|
||||||
# cron:
|
|
||||||
# build:
|
|
||||||
# context: ./
|
|
||||||
# dockerfile: development.Dockerfile
|
|
||||||
# command: ./bin/cron-entrypoint
|
|
||||||
# volumes:
|
|
||||||
# - .:/usr/src/app
|
|
||||||
# - bundle:/usr/local/bundle
|
|
||||||
# environment:
|
|
||||||
# - RAILS_ENV=development
|
|
||||||
# - PUID=1000
|
|
||||||
# - PGID=100
|
|
||||||
# depends_on:
|
|
||||||
# web:
|
|
||||||
# condition: service_healthy
|
|
||||||
# - db
|
|
||||||
volumes:
|
|
||||||
# redis_data:
|
|
||||||
bundle:
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
@@ -0,0 +1,52 @@
|
|||||||
|
services:
|
||||||
|
web:
|
||||||
|
image: ghcr.io/britton-benefits/baclight:beta
|
||||||
|
ports:
|
||||||
|
- "3002:3002"
|
||||||
|
environment:
|
||||||
|
- HISTFILE=/usr/src/app/log/.bash_history
|
||||||
|
- RAILS_ENV=production
|
||||||
|
- RAILS_SERVE_STATIC_FILES=true
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- JASPER_SERVER_HOST=jasper
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
restart: always
|
||||||
|
cron:
|
||||||
|
image: ghcr.io/britton-benefits/baclight:beta
|
||||||
|
command: ./bin/cron-entrypoint
|
||||||
|
user: root
|
||||||
|
environment:
|
||||||
|
- RAILS_ENV=production
|
||||||
|
# - PUID=1000
|
||||||
|
# - PGID=1000
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- web
|
||||||
|
jobs:
|
||||||
|
image: ghcr.io/britton-benefits/baclight:beta
|
||||||
|
command: ./bin/jobs-entrypoint
|
||||||
|
# user: rails
|
||||||
|
environment:
|
||||||
|
- RAILS_ENV=production
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
deploy:
|
||||||
|
replicas: 2
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- web
|
||||||
|
jasper:
|
||||||
|
image: ghcr.io/britton-benefits/jasper:beta
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
# volumes:
|
||||||
|
# - ./jasper_reports/build:/usr/src/app/build
|
||||||
|
# - ./jasper_reports/compiled_war:/app/compiled_war
|
||||||
|
# - ./jasper_reports/web/reports:/usr/local/tomcat/webapps/app/web/reports
|
||||||
|
restart: always
|
||||||
|
# volumes:
|
||||||
|
# bundle:
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
services:
|
||||||
|
web:
|
||||||
|
build:
|
||||||
|
context: ./baclight/
|
||||||
|
dockerfile: development.Dockerfile
|
||||||
|
container_name: baclight
|
||||||
|
volumes:
|
||||||
|
- ./baclight/:/usr/src/app
|
||||||
|
- bundle:/usr/local/bundle
|
||||||
|
ports:
|
||||||
|
- "3002:3002"
|
||||||
|
environment:
|
||||||
|
- HISTFILE=/usr/src/app/log/.bash_history
|
||||||
|
- RAILS_ENV=development
|
||||||
|
# - RAILS_ENV=production
|
||||||
|
- RAILS_SERVE_STATIC_FILES=true
|
||||||
|
- TAILWIND_POLLING=true
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=100
|
||||||
|
- JASPER_SERVER_HOST=jasper
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
networks:
|
||||||
|
- britton_network
|
||||||
|
|
||||||
|
cron:
|
||||||
|
build:
|
||||||
|
context: ./baclight/
|
||||||
|
dockerfile: development.Dockerfile
|
||||||
|
command: ./bin/cron-entrypoint
|
||||||
|
volumes:
|
||||||
|
- ./baclight/:/usr/src/app
|
||||||
|
- bundle:/usr/local/bundle
|
||||||
|
environment:
|
||||||
|
- RAILS_ENV=development
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=100
|
||||||
|
depends_on:
|
||||||
|
- web
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
context: ./baclight/
|
||||||
|
dockerfile: development.Dockerfile
|
||||||
|
command: ./bin/jobs-entrypoint
|
||||||
|
volumes:
|
||||||
|
- ./baclight/:/usr/src/app
|
||||||
|
- bundle:/usr/local/bundle
|
||||||
|
environment:
|
||||||
|
- RAILS_ENV=development
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=100
|
||||||
|
# deploy:
|
||||||
|
# replicas: 2
|
||||||
|
# restart_policy:
|
||||||
|
# condition: on-failure
|
||||||
|
depends_on:
|
||||||
|
- web
|
||||||
|
jasper:
|
||||||
|
build: ./jasper_reports/
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
volumes:
|
||||||
|
# - ./jasper_reports/build:/usr/src/app/build
|
||||||
|
- ./jasper_reports/compiled_war:/app/compiled_war
|
||||||
|
- ./jasper_reports/web/reports:/usr/local/tomcat/webapps/app/web/reports
|
||||||
|
networks:
|
||||||
|
- britton_network
|
||||||
|
# restart: always
|
||||||
|
|
||||||
|
networks:
|
||||||
|
britton_network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
bundle:
|
||||||
Reference in New Issue
Block a user