diff --git a/app/views/dashboard/_getting_started_prompt.html.erb b/app/views/dashboard/_getting_started_prompt.html.erb index b56f408dcf..8ad0f15839 100644 --- a/app/views/dashboard/_getting_started_prompt.html.erb +++ b/app/views/dashboard/_getting_started_prompt.html.erb @@ -3,7 +3,7 @@ <% location_criteria_met = org_stats.storage_locations_added > 0 %> <% donation_criteria_met = org_stats.donation_sites_added > 0 %> <% inventory_criteria_met = org_stats.locations_with_inventory.length > 0 %> -<% criterias = [ partner_criteria_met, location_criteria_met, donation_criteria_met, inventory_criteria_met ] %> +<% criterias = [ location_criteria_met, partner_criteria_met, donation_criteria_met, inventory_criteria_met ] %> <% current_step = criterias.find_index(false) %> <% if current_step.present? %> @@ -30,7 +30,7 @@ current_step: current_step, criterias: criterias, lines: ["line-right", "line-right line-left", "line-right line-left", "line-left"], - step_labels: ["Partner Agencies", "Storage Locations", "Donation Sites", "Inventory"] + step_labels: ["Storage Locations", "Partner Agencies", "Donation Sites", "Inventory"] } %> @@ -38,21 +38,21 @@
- <% if partner_criteria_met %> + <% if location_criteria_met %> <% else %> - + <% end %> -

<%= pluralize(org_stats.partners_added, 'Partner Agency') %> Added

+

<%= pluralize(org_stats.storage_locations_added, 'Storage Location') %> Added

- To start building your community in Human Essentials, import a list of your current partner agencies or add them individually. + Add details for all Storage Locations you use for your inventory.

-
- <% partner_link_text = partner_criteria_met ? "Add More Partners" : "Add a Partner" %> - <%= new_button_to new_partner_path, { text: partner_link_text, size: "md" } %> +
+ <% location_link_text = location_criteria_met ? "Add More Storage Locations" : "Add a Storage Location" %> + <%= new_button_to new_storage_location_path, { text: location_link_text, size: "md" } %>
@@ -62,21 +62,21 @@
- <% if location_criteria_met %> + <% if partner_criteria_met %> <% else %> - + <% end %> -

<%= pluralize(org_stats.storage_locations_added, 'Storage Location') %> Added

+

<%= pluralize(org_stats.partners_added, 'Partner Agency') %> Added

- Add details for all Storage Locations you use for your inventory. + To start building your community in Human Essentials, import a list of your current partner agencies or add them individually.

-
- <% location_link_text = location_criteria_met ? "Add More Storage Locations" : "Add a Storage Location" %> - <%= new_button_to new_storage_location_path, { text: location_link_text, size: "md" } %> +
+ <% partner_link_text = partner_criteria_met ? "Add More Partners" : "Add a Partner" %> + <%= new_button_to new_partner_path, { text: partner_link_text, size: "md" } %>
diff --git a/spec/system/dashboard_system_spec.rb b/spec/system/dashboard_system_spec.rb index 6e7da20e8a..52886a780f 100644 --- a/spec/system/dashboard_system_spec.rb +++ b/spec/system/dashboard_system_spec.rb @@ -16,25 +16,25 @@ # rubocop:disable Layout/ExtraSpacing - # When dashboard loads, ensure that we are on step 1 (Partner Agencies) + # When dashboard loads, ensure that we are on step 1 (Storage Locations) expect(org_dashboard_page).to have_getting_started_guide - expect(org_dashboard_page).to have_add_partner_call_to_action - expect(org_dashboard_page).not_to have_add_storage_location_call_to_action + expect(org_dashboard_page).to have_add_storage_location_call_to_action + expect(org_dashboard_page).not_to have_add_partner_call_to_action expect(org_dashboard_page).not_to have_add_donation_site_call_to_action expect(org_dashboard_page).not_to have_add_inventory_call_to_action - # After we create a partner, ensure that we are on step 2 (Storage Locations) - create(:partner, organization: organization) + # After we create a storage location, ensure that we are on step 2 (Partner Agency) + create(:storage_location, organization: organization) org_dashboard_page.visit expect(org_dashboard_page).to have_getting_started_guide - expect(org_dashboard_page).not_to have_add_partner_call_to_action - expect(org_dashboard_page).to have_add_storage_location_call_to_action + expect(org_dashboard_page).to have_add_partner_call_to_action + expect(org_dashboard_page).not_to have_add_storage_location_call_to_action expect(org_dashboard_page).not_to have_add_donation_site_call_to_action expect(org_dashboard_page).not_to have_add_inventory_call_to_action - # After we create a storage location, ensure that we are on step 3 (Donation Site) - create(:storage_location, organization: organization) + # After we create a partner agency, ensure that we are on step 3 (Donation Site) + create(:partner, organization: organization) org_dashboard_page.visit expect(org_dashboard_page).to have_getting_started_guide