-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into seed/inactive-location-and-items
- Loading branch information
Showing
15 changed files
with
101 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,10 @@ Make sure to install **Ubuntu** as your Linux distribution. (This should be defa | |
Waiting Approval Partner | ||
Email: [email protected] | ||
Password: password! | ||
Another approved partner (with all groups): | ||
Email: [email protected] | ||
Pasword: password! | ||
``` | ||
</details> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
db/migrate/20241002205346_backfill_vendor_business_name_from_contact.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class BackfillVendorBusinessNameFromContact < ActiveRecord::Migration[7.1] | ||
def change | ||
Vendor.where(business_name: [nil, ""]).update_all('business_name = contact_name') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,11 +130,18 @@ def random_record_for_org(org, klass) | |
# ---------------------------------------------------------------------------- | ||
Organization.all.each do |org| | ||
# Setup the Partner Group & their item categories | ||
partner_group = FactoryBot.create(:partner_group, organization: org) | ||
partner_group_one = FactoryBot.create(:partner_group, organization: org) | ||
|
||
total_item_categories_to_add = Faker::Number.between(from: 1, to: 2) | ||
org.item_categories.sample(total_item_categories_to_add).each do |item_category| | ||
partner_group.item_categories << item_category | ||
partner_group_one.item_categories << item_category | ||
end | ||
|
||
next unless org.name == pdx_org.name | ||
|
||
partner_group_two = FactoryBot.create(:partner_group, organization: org) | ||
org.item_categories.each do |item_category| | ||
partner_group_two.item_categories << item_category | ||
end | ||
end | ||
|
||
|
@@ -225,11 +232,22 @@ def random_record_for_org(org, klass) | |
email: "[email protected]", | ||
status: :awaiting_review, | ||
notes: note.sample | ||
}, | ||
{ | ||
name: "Second Street Community Outreach", | ||
status: :approved, | ||
email: "[email protected]", | ||
notes: note.sample | ||
} | ||
].each do |partner_option| | ||
p = Partner.find_or_create_by!(partner_option) do |partner| | ||
partner.organization = pdx_org | ||
partner.partner_group = pdx_org.partner_groups.first | ||
|
||
if partner_option[:name] == "Second Street Community Outreach" | ||
partner.partner_group = pdx_org.partner_groups.find_by(name: 'Group 2') | ||
else | ||
partner.partner_group = pdx_org.partner_groups.first | ||
end | ||
end | ||
|
||
profile = Partners::Profile.create!({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters