Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch with oregon branding #4926

Open
wants to merge 64 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
f8dbf3a
branch with oregon branding
kristinmerbach Jan 13, 2025
ed88d59
make or a separate client
kristinmerbach Jan 15, 2025
116452f
add or client to gha
kvootla Jan 15, 2025
c129778
starting assisters portal
kristinmerbach Jan 15, 2025
7f17c11
adding models
kristinmerbach Jan 15, 2025
fc41eb3
few more updates from broker to assister
harshaellanki Jan 15, 2025
6222ff0
minor visual changes
kristinmerbach Jan 15, 2025
3649a80
WIP: assister registration
harshaellanki Jan 15, 2025
04cc3ce
fix assister registration form styling
kristinmerbach Jan 15, 2025
9d1ef3e
few more steps towards Assister agency registration
harshaellanki Jan 16, 2025
d1b7764
assister pundit policies
kristinmerbach Jan 16, 2025
6c50126
translations typo fix
harshaellanki Jan 16, 2025
cc00f7c
assister agency index, broker and assister history on show
kristinmerbach Jan 16, 2025
85a3929
bring back family datatable
kristinmerbach Jan 16, 2025
7312ce1
fix build error, start fixing issuers index
kristinmerbach Jan 16, 2025
a3de8d1
update gha to auto-build feature branch
kvootla Jan 16, 2025
25dbc78
assister agency staff registeration and assister approveal by admin
harshaellanki Jan 17, 2025
6dee5f8
able to access assister profile views
kristinmerbach Jan 17, 2025
ffe82a8
assister inbox
kristinmerbach Jan 17, 2025
982503d
add assister search functionality
rahulgudim Jan 17, 2025
97bf961
broker agency and staff approvals
harshaellanki Jan 17, 2025
7b9e53e
few more UI changes
rahulgudim Jan 17, 2025
c21fc78
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
rahulgudim Jan 17, 2025
23b0a94
connect assister and family via the get help signing up widget
kristinmerbach Jan 21, 2025
a04b67c
connect assister and family via the get help signing up widget
kristinmerbach Jan 21, 2025
e49987e
hire assister
kristinmerbach Jan 21, 2025
e8af694
add hel me signup
rahulgudim Jan 21, 2025
d7d9317
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
rahulgudim Jan 21, 2025
43279bb
display associated assisters
kristinmerbach Jan 21, 2025
3ca5485
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
rahulgudim Jan 21, 2025
95e009e
assisters family page
kristinmerbach Jan 21, 2025
d4a757e
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
rahulgudim Jan 21, 2025
bd3f85a
show assister in my portal link, tested navigating family as assister
kristinmerbach Jan 21, 2025
401a910
fix translations and color for sub nav
kristinmerbach Jan 21, 2025
e547bcd
Fix select broker or assister help screens
rahulgudim Jan 21, 2025
0f5d025
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
rahulgudim Jan 21, 2025
d080a88
few more translations
rahulgudim Jan 21, 2025
ea36341
assister staff registration
kristinmerbach Jan 21, 2025
651b132
add assister org id field
kristinmerbach Jan 21, 2025
90e0af0
add my expert tab to families section
rahulgudim Jan 21, 2025
f2f4d6f
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
rahulgudim Jan 21, 2025
c296489
fix assister search by ao_id
harshaellanki Jan 21, 2025
e821335
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
harshaellanki Jan 21, 2025
2a1e7cf
Add broker and assister in my expert section
rahulgudim Jan 21, 2025
b068e98
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
rahulgudim Jan 21, 2025
7973f06
add assisters copy to get help signing up modal
kristinmerbach Jan 22, 2025
b04097f
replace lingering references to maine with oregon
kristinmerbach Jan 22, 2025
43ba8e7
add oregon seedfile (#4945)
nks2109 Jan 22, 2025
51f9b84
add carrier contact information partial (#4948)
nks2109 Jan 22, 2025
86bdfce
fix missing pundit error
kristinmerbach Jan 22, 2025
83e096f
written language preference
kristinmerbach Jan 22, 2025
2ce707c
site_key to or
kristinmerbach Jan 22, 2025
8d143f7
add missing translations
rahulgudim Jan 23, 2025
0d64ad7
add new oregon carrier to seedfile (#4956)
nks2109 Jan 23, 2025
f573944
missing or specific files
kristinmerbach Jan 23, 2025
cce8b91
fix assister access to registration edit
kristinmerbach Jan 23, 2025
8778460
destroying assister only removes assister, not broker
kristinmerbach Jan 24, 2025
df291f0
add missing translation
rahulgudim Jan 24, 2025
087afe4
Merge branch 'oregon_branded' of https://github.com/ideacrew/enroll i…
rahulgudim Jan 24, 2025
8a52841
add paynow config for new carriers (#4960)
saipraveen18 Jan 24, 2025
2dee1fd
remove maine reference in broker description
kristinmerbach Jan 24, 2025
a18860e
assister able to approve staff
harshaellanki Jan 24, 2025
176b23e
fix maine references
kristinmerbach Jan 24, 2025
075e504
fix assister header link
harshaellanki Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
push:
branches:
- 'trunk'
- 'clean-bootstrap-4-upgrade'
- 'oregon_branded'
pull_request:
branches:
- 'trunk'
- 'clean-bootstrap-4-upgrade'
- 'oregon_branded'

concurrency:
group: docker-${{ github.ref }}
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
needs: [prep]
strategy:
matrix:
client: ['dc', 'me']
client: ['dc', 'me', 'or']
runs-on: ubuntu-latest
services:
rabbitmq:
Expand Down Expand Up @@ -252,7 +252,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
client: ['dc', 'me']
client: ['dc', 'me', 'or']
registry: ['public.ecr.aws', 'ghcr.io']
steps:
- run: |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/icons/or-icon-individual.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/icons/or-life-event.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/icons/or-shop_for_plan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/oregon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions app/assets/javascripts/exchanges/assister_applicants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function enableAssisterApplicantFilters() {
var url = '/exchanges/assister_applicants.js';

if( $('#assister_agency_profile_id').length ) {
url = $('#assister_agency_profile_id').attr("href") + ".js";
}

$('div[name=assister_applicants_tabs] > ').children().each( function() {
$(this).change(function(){
filter = $(this).val();
$.ajax({
url: url,
type: "GET",
data : { 'status': filter }
});
});
});

const filterInputs = document.querySelectorAll('#applicantsFilters input');
const bs4 = document.documentElement.dataset.bs4;

filterInputs.forEach(input => {
input.addEventListener('change', function(){
var filter = $(this).val();
$.ajax({
url: url,
type: "GET",
data : { 'status': filter, 'bs4': bs4 }
});
});
});
}
11 changes: 6 additions & 5 deletions app/assets/javascripts/help_me_sign_up.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $(document).on('click', '.name_search_only', function() {
$('#help_type').html(this.id)
$('#back_to_help').removeClass('hide')
})
$(document).on('click', '[data-target="#help_with_plan_shopping"]',function(){$('.help_reset').addClass("hide"); $('#help_list').removeClass("hide"); $('#back_to_help').addClass("hide"); $('#bottom_expert_link').removeClass("hide") })
$(document).on('click', '[data-target="#help_with_plan_shopping"]',function(){$('.help_reset').addClass("hide"); $('#help_list').removeClass("hide"); $('#back_to_help').addClass("hide"); $('#bottom_expert_link').removeClass("hide"); $('#bottom_expert_assister_link').removeClass("hide") })

$(document).on('click', '#back_to_help', function(){
$('.help_reset').addClass("hide");
Expand All @@ -49,6 +49,7 @@ $(document).on('click', '#back_to_help', function(){

$(document).on('click', '.select-broker', function(){
$('.select-broker').addClass('disabled');
var helper_type = this.getAttribute('data-assister') ? "assister" : "broker";
$.ajax({
type: 'GET',
data: {assister: this.getAttribute('data-assister'), broker: this.getAttribute('data-broker'),
Expand All @@ -61,10 +62,10 @@ $(document).on('click', '.select-broker', function(){
broker_status = JSON.parse(response);
var status = broker_status['status']
$('#inbox_provider_form').hide();
$('#active_broker_tab .alert').removeClass('alert-warning').addClass('alert-success')
$('#active_broker_tab .icon').removeClass('warning-icon').addClass('success-icon')
$('#active_broker_tab .warning-body').text(status)
$('#active_'+helper_type+'_tab .alert').removeClass('alert-warning').addClass('alert-success')
$('#active_'+helper_type+'_tab .icon').removeClass('warning-icon').addClass('success-icon')
$('#active_'+helper_type+'_tab .warning-body').text(status)
$('a.go-to-expert, button').removeClass('hidden').removeClass('hide');
$("#active_broker_tab button").addClass('hide')
$("#active_"+helper_type+"_tab button").addClass('hide')
});
})
4 changes: 4 additions & 0 deletions app/controllers/concerns/config/aca_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ def fehb_market_is_enabled?
def general_agency_is_enabled?
EnrollRegistry.feature_enabled?(:general_agency)
end

def assister_agency_is_enabled?
EnrollRegistry.feature_enabled?(:assister_agency)
end
end
2 changes: 1 addition & 1 deletion app/controllers/exchanges/agents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def bookmark_url_path(bookmark_url)

def user_permission_satisfied?
@roles = []
['agent', 'hbx_staff', 'broker', 'broker_agency_staff', 'general_agency_staff'].each do |role|
['agent', 'hbx_staff', 'broker', 'broker_agency_staff', 'assister', 'assister_agency_staff', 'general_agency_staff'].each do |role|
@roles << current_user.public_send("has_#{role}_role?")
end
@roles.include?(true) ? true : false
Expand Down
151 changes: 151 additions & 0 deletions app/controllers/exchanges/assister_applicants_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# frozen_string_literal: true
module Exchanges
class AssisterApplicantsController < ApplicationController
layout :resolve_layout

before_action :check_hbx_staff_role
before_action :find_assister_applicant, only: [:edit, :update]
before_action :set_cache_headers, only: [:index, :edit]
before_action :enable_bs4_layout if EnrollRegistry.feature_enabled?(:bs4_admin_flow)

def index
@people = Person.assister_role_having_agency

status_params = params.permit(:status)
@status = AssisterRole::ASSISTER_ROLE_STATUS_TYPES.include?(status_params[:status]) ? status_params[:status] : 'applicant'
@people = @people.send("assister_role_#{@status}") if @people.respond_to?("assister_role_#{@status}")
@page_alphabets = page_alphabets(@people, "last_name")

if params[:page].present?
page_no = cur_page_no(@page_alphabets.first)
@assister_applicants = @people.where("last_name" => /^#{Regexp.escape(page_no)}/i)
else
@assister_applicants = sort_by_latest_transition_time(@people).limit(20).entries
end

respond_to do |format|
format.html { render "shared/assisters/applicants" }
format.js
end
end

def edit
respond_to do |format|
format.html { render "shared/assisters/applicant.html.erb" }
end
end

def update
assister_role = @assister_applicant.assister_role
assister_role.update_attributes(reason: params.require(:person).require(:assister_role_attributes).permit(:reason)[:reason]) if params.dig(:person, :assister_role_attributes, :reason).present?
# TODO: This params['deny'] stuff might have to be changed to params['commit']['action_name']
if params['deny']
assister_role.deny!
flash[:notice] = "Assister applicant denied."
elsif params['update']
if assister_role.update!(assister_role_update_params)
flash[:notice] = "Assister applicant successfully updated."
else
flash[:error] = "Unable to update assister applicant."
end
elsif params['decertify']
assister_role.decertify!
flash[:notice] = "Assister applicant decertified."
elsif params['recertify']
assister_role.recertify!
flash[:notice] = "Assister applicant is now approved."
elsif params['extend']
assister_role.extend_application!
flash[:notice] = "Assister applicant is now extended."
elsif params['pending']
assister_carrier_appointments
assister_role.update(params.require(:person).require(:assister_role_attributes).permit(:training, :license, :carrier_appointments => {}).except(:id))
assister_role.pending!
flash[:notice] = "Assister applicant is now pending."
elsif params['sendemail']
assister_role.send_invitation
flash[:notice] = "Assister invite email has been resent."
else
assister_carrier_appointments
assister_role.update(params.require(:person).require(:assister_role_attributes).permit(:training, :license, :carrier_appointments => {}).except(:id))
assister_role.approve!
assister_role.reload

create_and_approve_staff_role_and_approve_agency(assister_role)

send_secure_message_to_assister_agency(assister_role) if assister_role.agency_pending? && assister_role.assister_agency_profile
flash[:notice] = "Assister applicant approved successfully."
end

redirect_to "/exchanges/hbx_profiles"
end

private

# @method create_and_approve_staff_role_and_approve_agency(assister_role)
# Creates a Assister Agency Staff Role (BASR) for a person with a consumer role and approves both the agency and the staff role.
#
# This method checks if the assister role is a primary assister.
# If it is, it creates a BASR for the person associated with the assister role.
# It then approves the assister agency profile associated with the assister role, if it is in a state where it may be approved.
# Finally, it accepts the newly created BASR, if it is in a state where it may be accepted.
#
# @param [AssisterRole] assister_role The assister role for which to create a BASR and approve the agency and staff role.
#
# @return [void] This method does not return a value. It modifies the state of the assister role, the assister agency profile, and the BASR.
#
# @example Create a BASR and approve both the agency and the staff role for a primary assister role
# create_and_approve_staff_role_and_approve_agency(assister_role)
def create_and_approve_staff_role_and_approve_agency(assister_role)
Operations::EnsureAssisterStaffRoleForPrimaryAssister.new(:application_approved).call(assister_role)
end

def assister_role_update_params
# Only assign if nil
params[:person][:assister_role_attributes][:carrier_appointments] ||= {}
params[:person][:assister_role_attributes].permit(:license, :training, :carrier_appointments => {})
end

def assister_carrier_appointments
all_carrier_appointments = EnrollRegistry[:brokers].setting(:carrier_appointments).item.stringify_keys
assister_carrier_appointments_enabled = Settings.aca.broker_carrier_appointments_enabled
if assister_carrier_appointments_enabled
params[:person][:assister_role_attributes][:carrier_appointments] = all_carrier_appointments.each{ |key,_str| all_carrier_appointments[key] = "true" }
else
# Fix this
permitted_params = params.require(:person).require(:assister_role_attributes).permit(:carrier_appointments => {}).to_h
all_carrier_appointments.merge!(permitted_params[:carrier_appointments]) if permitted_params[:carrier_appointments]
params[:person][:assister_role_attributes][:carrier_appointments] = all_carrier_appointments
end
end

def send_secure_message_to_assister_agency(assister_role)
hbx_admin = HbxProfile.all.first
assister_agency = assister_role.assister_agency_profile

subject = "Received new assister application - #{assister_role.person.full_name}"
body = "<br><p>Following are assister details<br>Assister Name : #{assister_role.person.full_name}<br>Assister NPN : #{assister_role.npn}</p>"
secure_message(hbx_admin, assister_agency, subject, body)
end

def find_assister_applicant
@assister_applicant = Person.find(BSON::ObjectId.from_string(params[:id]))
end

def check_hbx_staff_role
redirect_to exchanges_hbx_profiles_root_path, :flash => { :error => "You must be an HBX staff member" } unless current_user.has_hbx_staff_role?
end

def enable_bs4_layout
@bs4 = true
end

def resolve_layout
EnrollRegistry.feature_enabled?(:bs4_admin_flow) ? "progress" : "single_column"
end

def sort_by_latest_transition_time(assister_applicants)
assister_applicants.sort({"assister_role.workflow_state_transitions.created_at": -1})
end
end
end
33 changes: 25 additions & 8 deletions app/controllers/exchanges/hbx_profiles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ def assister_index

def request_help
raise ActionController::UnknownFormat unless request.format.html?

insured = Person.where(_id: params[:person]).first
authorize insured.primary_family, :request_help?

Expand All @@ -334,26 +333,32 @@ def request_help
authorize family, :hire_broker_agency?
family.hire_broker_agency(broker_role_id)
role = l10n("broker")
else
elsif params[:assister].present?
agent = Person.find(params[:assister])
role = 'In-Person Assister'
assister_role_id = agent.assister_role.id
consumer = Person.find(params[:person])
family = consumer.primary_family
authorize family, :hire_broker_agency?
family.hire_assister_agency(assister_role_id)
role = l10n("assister")
end
if role
status_text = 'Message sent to ' + role + ' ' + agent.full_name + ' <br>'
status_text = "Message sent to #{role} #{agent.full_name}."
if find_email(agent, role)
params.merge!(consumer_person_id: consumer.id.to_s) if consumer.present?
agent_assistance_messages(params,agent,role)
else

status_text = "Agent has no email. Please select another"
status_text = "Agent has no email. Please select another"
end
else
status_text = call_customer_service params[:firstname].strip, params[:lastname].strip
end
status_text = l10n("broker_agencies.successfully_assigned") if params[:broker].present?
status_text = l10n("broker_agencies.successfully_assigned") if params[:broker].present? || params[:assister].present?
@person = Person.find(params[:person])
broker_view = render_to_string 'insured/families/_consumer_brokers_widget', :layout => false
render :plain => {broker: broker_view, status: status_text, broker_id: broker_role_id}.to_json, layout: false
flash[:success] = status_text
broker_id = broker_role_id.present? ? broker_role_id : assister_role_id
render :plain => {broker: broker_view, status: status_text, broker_id: broker_id}.to_json, layout: false
end

def family_index
Expand Down Expand Up @@ -607,6 +612,16 @@ def broker_agency_index
end
end

def assister_agency_index
authorize HbxProfile, :assister_agency_index?

@datatable = Effective::Datatables::AssisterAgencyDatatable.new

respond_to do |format|
format.html { render 'exchanges/hbx_profiles/assister_agency_index_datatable' }
end
end

def general_agency_index
authorize HbxProfile, :general_agency_index?

Expand Down Expand Up @@ -880,6 +895,8 @@ def ivl_dry_run_dashboard
def find_email(agent, role)
if role == l10n("broker")
agent.try(:broker_role).try(:email).try(:address)
elsif role == l10n("assister")
agent.try(:assister_role).try(:email).try(:address)
else
agent.try(:user).try(:email)
end
Expand Down
22 changes: 10 additions & 12 deletions app/controllers/insured/consumer_roles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,16 @@ def update
fire_consumer_roles_update_for_vlp_docs(@consumer_role, @consumer_role.is_applying_coverage)
redirect_to redirect_path
end
elsif save_and_exit
respond_to do |format|
format.html {redirect_to destroy_user_session_path}
end
else
if save_and_exit
respond_to do |format|
format.html {redirect_to destroy_user_session_path}
end
else
@consumer_role.build_nested_models_for_person
@vlp_doc_subject = get_vlp_doc_subject_by_consumer_role(@consumer_role)
bubble_address_errors_by_person(@consumer_role.person)
respond_to do |format|
format.html { render "edit" }
end
@consumer_role.build_nested_models_for_person
@vlp_doc_subject = get_vlp_doc_subject_by_consumer_role(@consumer_role)
bubble_address_errors_by_person(@consumer_role.person)
respond_to do |format|
format.html { render "edit" }
end
end
end
Expand Down Expand Up @@ -486,7 +484,7 @@ def person_parameters_list
{ :addresses_attributes => [:kind, :address_1, :address_2, :city, :state, :zip, :county, :id, :_destroy] },
{ :phones_attributes => [:kind, :full_phone_number, :id, :_destroy] },
{ :emails_attributes => [:kind, :address, :id, :_destroy] },
{ :consumer_role_attributes => [:contact_method, :language_preference]},
{ :consumer_role_attributes => [:contact_method, :language_preference, :written_language_preference]},
:first_name,
:last_name,
:middle_name,
Expand Down
Loading
Loading