Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def flipper_id
['Sources of Funding', 'sources_of_funding'],
['Area Served', 'area_served'],
['Population Served', 'population_served'],
['Executive Director', 'executive_director'],
['Contacts', 'contacts'],
['Pickup Person', 'pick_up_person'],
['Agency Distribution Information', 'agency_distribution_information'],
['Attached Documents', 'attached_documents']
Expand Down
2 changes: 1 addition & 1 deletion app/models/partners/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Profile < Base
# population_hispanic, population_asian, population_american_indian, population_island,
# population_multi_racial, population_other, zips_served, at_fpl_or_below, above_1_2_times_fpl
# greater_2_times_fpl, poverty_unknown
# executive_director
# contacts
# executive_director_name, executive_director_phone, executive_director_email, primary_contact_name,
# primary_contact_phone, primary_contact_mobile, primary_contact_email
# pick_up_person
Expand Down
2 changes: 1 addition & 1 deletion app/services/exports/export_partners_csv_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def population_served_col(table)
end

def executive_director_col(table)
if @partials_to_show.include? "executive_director"
if @partials_to_show.include? "contacts"
table["Executive Director Name"] = ->(partner) { partner.profile.executive_director_name }
table["Executive Director Phone"] = ->(partner) { partner.profile.executive_director_phone }
table["Executive Director Email"] = ->(partner) { partner.profile.executive_director_email }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="card mb-4">
<h5 class="card-header bg-primary text-white">Executive Director</h5>
<h5 class="card-header bg-primary text-white">Contacts</h5>
<div class="card-body">
<h5 class="fw-bold">Executive Director</h5>
<dl>
<dt>Name</dt>
<dd><%= profile.executive_director_name %></dd>
Expand All @@ -12,7 +13,7 @@
<dd><%= profile.executive_director_email %></dd>
</dl>

<h6>Primary Contact Person</h6>
<h5 class="fw-bold">Primary Contact Person</h5>
<dl>
<dt>Name</dt>
<dd><%= profile.primary_contact_name %></dd>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<%= f.fields_for :profile, profile do |pf| %>
<h3 class="pt-3"><strong>Executive Director</strong></h3>

<div class="form-group">
<%= pf.input :executive_director_name, label: "Executive Director Name", class: "form-control" %>
</div>
Expand Down
7 changes: 4 additions & 3 deletions app/views/profiles/_show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,14 @@
<p>Poverty Unknown: <%= partner_profile.poverty_unknown %></p>
<br>
<% end %>
<% if partner_profile_fields.include?('executive_director') || partner_profile_fields.empty? %>
<h4 class='text-2xl underline'>Executive Director</h4>
<% if partner_profile_fields.include?('contacts') || partner_profile_fields.empty? %>
<h4 class='text-2xl underline'>Contacts</h4>
<strong>Executive Director</strong>
<p>Executive Director Name: <%= partner_profile.executive_director_name %></p>
<p>Executive Director Phone: <%= partner_profile.executive_director_phone %></p>
<p>Executive Director Email: <%= partner_profile.executive_director_email %></p>
<br>
<h4 class='text-2xl underline'>Primary Contact Person</h4>
<strong>Primary Contact Person</strong>
<p>Primary Contact Name: <%= partner_profile.primary_contact_name %></p>
<p>Primary Contact Phone: <%= partner_profile.primary_contact_phone %></p>
<p>Primary Contact Mobile: <%= partner_profile.primary_contact_mobile %></p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
class RenameExecutiveDirectorToContactsInPartnerFormFields < ActiveRecord::Migration[8.0]
class Organization < ApplicationRecord
self.table_name = "organizations"
end

def up
organizations_to_update = Organization.where.not(partner_form_fields: [])
organizations_to_update.each do |org|
if org.partner_form_fields.include?("executive_director")
org.partner_form_fields =
org.partner_form_fields.map { |f| f == "executive_director" ? "contacts" : f }
org.save!
end
end

still_has_old_field = Organization.where("? = ANY (partner_form_fields)", "executive_director").exists?
raise "Migration failed: some organizations still have 'executive_director' in partner_form_fields" if still_has_old_field
end

def down
organizations_to_update = Organization.where.not(partner_form_fields: [])
organizations_to_update.each do |org|
if org.partner_form_fields.include?("contacts")
org.partner_form_fields =
org.partner_form_fields.map { |f| f == "contacts" ? "executive_director" : f }
org.save!
end
end

still_has_contacts_field = Organization.where("? = ANY (partner_form_fields)", "contacts").exists?
raise "Rollback failed: some organizations still have 'contacts' in partner_form_fields" if still_has_contacts_field
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[8.0].define(version: 2025_09_13_173217) do
ActiveRecord::Schema[8.0].define(version: 2025_09_26_084615) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"

Expand Down
4 changes: 2 additions & 2 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def seed_random_item_with_name(organization, name)
end

# Base profile information all partners should have
# Includes fields in the agency_information, executive_director, and pick_up_person partial
# Includes fields in the agency_information, contacts, and pick_up_person partial
# The counties and areas served by the partner are handled elsewere
profile = Partners::Profile.create!({
essentials_bank_id: p.organization_id,
Expand Down Expand Up @@ -352,7 +352,7 @@ def seed_random_item_with_name(organization, name)
receives_essentials_from_other: Faker::Lorem.sentence,
)
end

if p.partials_to_show.include? "organizational_capacity"
profile.update(
client_capacity: Faker::Lorem.sentence,
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/bank/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Population Served
- % Greater than 2 times FPL,
- % Poverty Unknown

Executive Director
Contacts
- Executive Director Name,
- Executive Director Phone,
- Executive Director Email,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 17 additions & 14 deletions docs/user_guide/bank/pm_partner_profiles.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Partner Profiles
Partner Profiles allow you to gather and hold a lot of information about your Partners that may be useful for meeting your regulatory requirements, managing their experience, and for grant-writing.
Partner Profiles allow you to gather and hold a lot of information about your Partners that may be useful for meeting your regulatory requirements, managing their experience, and for grant-writing.

There is a *lot* of information in the profiles, and the information that is needed varies from bank to bank. Once you decide what information you need from your partners, you can set up the Partner Profiles to show the sections that you need, customizing it through ["My organization"](getting_started_customization.md).

## How does a Partner fill in and submit their profile

In the Partner's view of the system, they can click on "Edit My Profile" to fill in all the information you want.
In the Partner's view of the system, they can click on "Edit My Profile" to fill in all the information you want.
Once they have saved this, they will also see a "Submit for Approval" button. Clicking that changes their status to "Waiting for Approval", and makes them appear in your [dashboard](essentials_dashboard.md) list of partners waiting for approval, as well as making a "Review Partner's application" button appear beside them in your view of all the Partners.

# Viewing a Partner Profile
Expand Down Expand Up @@ -42,8 +42,7 @@ The high level sections of the partner profile are:
- Sources of Funding
- Area Served (County/Client Share %)
- Population Served
- Executive Director
- Primary Contact
- Contacts
- Pick up Person
- Race/Ethnicity of Client Base
- Agency Distribution Information
Expand Down Expand Up @@ -77,7 +76,7 @@ Sometimes, a large agency may have a separate address for a specific program or

### Media Information
![screenshot of expanded media information section](images/partners/partners_profile_edit_media.png)
This provides a place for the agency to indicate their major communication outlets.
This provides a place for the agency to indicate their major communication outlets.

*If* the bank chooses to ask for this information, the Partner must fill in at least one of the fields:

Expand All @@ -89,9 +88,9 @@ This provides a place for the agency to indicate their major communication outle

### Agency Stability
![screenshot of expanded agency stability section](images/partners/partners_profile_edit_agency_stability.png)
This section is about the maturity of the agency.
This section is about the maturity of the agency.

None of these fields are mandatory.
None of these fields are mandatory.

- Year founded
- Form 990
Expand Down Expand Up @@ -125,7 +124,7 @@ How does the agency get its funding?

This asks what county/county equivalents the agency serves and what proportion of their client share is in which area.

At this time, this only covers U.S. counties and equivalents. We believe the list covers *all* of the U.S, including some areas that are not technically counties.
At this time, this only covers U.S. counties and equivalents. We believe the list covers *all* of the U.S, including some areas that are not technically counties.
Let us know if you need more!

The sum of the client share has to be either 0 or 100, and the numbers have to be positive whole numbers.
Expand Down Expand Up @@ -165,19 +164,23 @@ There is no check on whether the numbers add up to 100 -- because there may be o
- % Greater than 2 times FPL
- % Poverty Unknown

### Executive Director
### Contacts
![screenshot of expanded executive director section](images/partners/partners_profile_edit_executive.png)
![NOTE] This section currently contains both Executive Director and Primary Contact for the partner. We have splitting them up in our queue.
Contact information for the head of the agency:
-
-
- Executive Director Name
- Executive Director Phone
- Executive Director Email
- Primary Contact Name
- Primary Contact Phone
- Primary Contact Cell
- Primary Contact Email

This is for your information only. It is not used for any emails.

#### Primary Contact
Contact information for your bank's primary contact
Contact information for your bank's primary contact
- Primary Contact Name
- Primary Contact Phone
- Primary Contact Cell
Expand All @@ -190,15 +193,15 @@ This is for your information only. It is not used for any emails.
The Pick up person (as well as the person who made the Request) will receive an email when a Distribution is scheduled, if the Distribution type is "Pick up"
- Pick Up Person Name
- Pick Up Person's Phone #
- Pick Up Person's Email
- Pick Up Person's Email
- This can be multiple, comma-separated emails.

### Agency Distribution Information
![screenshot of expanded agency distribution section](images/partners/partners_profile_edit_agency_distribution.png)
This section is about the agency's practices when distributing to their clients.
- Distribution Times
- New Client Times
- More Docs Required
- More Docs Required
- This is meant to be the documentation required for new clients

### Additional Documents
Expand All @@ -214,4 +217,4 @@ Only the options that you haven't already turned off will show up there, and at
- Enable Requests for Individuals


[Prior: inviting a Partner](pm_inviting_a_partner.md) [Next: Approving a Partner](pm_approving_a_partner.md)
[Prior: inviting a Partner](pm_inviting_a_partner.md) [Next: Approving a Partner](pm_approving_a_partner.md)
8 changes: 4 additions & 4 deletions spec/services/exports/export_partners_csv_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
above_1_2_times_fpl: 25,
greater_2_times_fpl: 25,
poverty_unknown: 25,
executive_director_name: "executive_director_name", # Columns from the executive_director partial
executive_director_name: "executive_director_name", # Columns from the contacts partial
executive_director_phone: "executive_director_phone",
executive_director_email: "executive_director_email",
primary_contact_name: "Jon Ralfeo",
Expand Down Expand Up @@ -93,7 +93,7 @@
:sources_of_funding,
:area_served,
:population_served,
:executive_director,
:contacts,
:pick_up_person,
:agency_distribution_information
]
Expand Down Expand Up @@ -167,7 +167,7 @@
"% Greater than 2 times FPL",
"% Poverty Unknown"
],
executive_director: [
contacts: [
"Executive Director Name",
"Executive Director Phone",
"Executive Director Email",
Expand Down Expand Up @@ -265,7 +265,7 @@
"25",
"25"
],
executive_director: [
contacts: [
"executive_director_name",
"executive_director_phone",
"executive_director_email",
Expand Down
12 changes: 6 additions & 6 deletions spec/system/partner_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,10 @@
find("button[data-bs-target='#media_information']").click
expect(page).to have_css("#media_information.accordion-collapse.collapse", visible: false)

# Executive director
find("button[data-bs-target='#executive_director']").click
expect(page).to have_css("#executive_director.accordion-collapse.collapse.show", visible: true)
within "#executive_director" do
# Contacts
find("button[data-bs-target='#contacts']").click
expect(page).to have_css("#contacts.accordion-collapse.collapse.show", visible: true)
within "#contacts" do
fill_in "Executive Director Name", with: "Lisa Smith"
end

Expand Down Expand Up @@ -537,7 +537,7 @@
expect(page).to have_content("Enable child based requests At least one request type must be set")
expect(page).to have_content("Pick up email can't have more than three email addresses")

# Expect media section, executive director section, and partner settings section to be opened
# Expect media section, pick up person section, and partner settings section to be opened
expect(page).to have_css("#media_information.accordion-collapse.collapse.show", visible: true)
expect(page).to have_css("#pick_up_person.accordion-collapse.collapse.show", visible: true)
expect(page).to have_css("#partner_settings.accordion-collapse.collapse.show", visible: true)
Expand All @@ -551,7 +551,7 @@
expect(page).to have_content("Enable child based requests At least one request type must be set")
expect(page).to have_content("Pick up email can't have more than three email addresses")

# Expect media section, executive director section, and partner settings section to be opened
# Expect media section, pick up person section, and partner settings section to be opened
expect(page).to have_css("#media_information.accordion-collapse.collapse.show", visible: true)
expect(page).to have_css("#pick_up_person.accordion-collapse.collapse.show", visible: true)
expect(page).to have_css("#partner_settings.accordion-collapse.collapse.show", visible: true)
Expand Down
12 changes: 6 additions & 6 deletions spec/system/partners/profile_edit_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
find("button[data-bs-target='#media_information']").click
expect(page).to have_css("#media_information.accordion-collapse.collapse", visible: false)

# Executive director
find("button[data-bs-target='#executive_director']").click
expect(page).to have_css("#executive_director.accordion-collapse.collapse.show", visible: true)
within "#executive_director" do
# Contacts
find("button[data-bs-target='#contacts']").click
expect(page).to have_css("#contacts.accordion-collapse.collapse.show", visible: true)
within "#contacts" do
fill_in "Executive Director Name", with: "Lisa Smith"
end

Expand Down Expand Up @@ -80,7 +80,7 @@
expect(page).to have_content("Enable child based requests At least one request type must be set")
expect(page).to have_content("Pick up email can't have more than three email addresses")

# Expect media section, executive director section, and partner settings section to be opened
# Expect media section, pick up person section, and partner settings section to be opened
expect(page).to have_css("#media_information.accordion-collapse.collapse.show", visible: true)
expect(page).to have_css("#pick_up_person.accordion-collapse.collapse.show", visible: true)
expect(page).to have_css("#partner_settings.accordion-collapse.collapse.show", visible: true)
Expand All @@ -94,7 +94,7 @@
expect(page).to have_content("Enable child based requests At least one request type must be set")
expect(page).to have_content("Pick up email can't have more than three email addresses")

# Expect media section, executive director section, and partner settings section to be opened
# Expect media section, pick up person section, and partner settings section to be opened
expect(page).to have_css("#media_information.accordion-collapse.collapse.show", visible: true)
expect(page).to have_css("#pick_up_person.accordion-collapse.collapse.show", visible: true)
expect(page).to have_css("#partner_settings.accordion-collapse.collapse.show", visible: true)
Expand Down