Skip to content

Commit

Permalink
Merge branch 'main' into 4473-expand-reminder-date-possibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
jlandiseigsti committed Sep 20, 2024
2 parents a0d1a65 + 51ed96b commit 1af66e8
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/models/donation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def storage_view
storage_location.nil? ? "N/A" : storage_location.name
end

def in_kind_value_money
Money.new(value_per_itemizable)
end

private

def combine_duplicates
Expand Down
3 changes: 3 additions & 0 deletions app/services/exports/export_donations_csv_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def base_table
"Variety of Items" => ->(donation) {
donation.line_items.map(&:name).uniq.size
},
"In-Kind Value" => ->(donation) {
donation.in_kind_value_money
},
"Comments" => ->(donation) {
donation.comment
}
Expand Down
46 changes: 45 additions & 1 deletion docs/user_guide/bank/community_donation_sites.md
Original file line number Diff line number Diff line change
@@ -1 +1,45 @@
Not yet written
# Donation Sites

Donation sites are places where people drop off donations. You can manage the sites' information on the "Donation Sites" page under the "Community" section.

![Donation Sites](images/community/donation_sites/donation_sites.jpg)

Previously recorded information about donation sites appears on this page including the name of the donation site name, address, contact name, e-mail and phone number.

### Adding a Donation Site

Create a new site by populating the donation site, address, contact name, e-mail and phone fields and clicking the "Create" button.

![Create Donation_Site](images/community/donation_sites/create_donation_site.jpg)

Note that the donation site and address fields are mandatory while the contact name, email and phone are optional.

You can also use the "+ New Donation Site" button which renders a form for you to fill in details of a new donation site.

![Add Donation_Site](images/community/donation_sites/add_new_donation_site.jpg)

After saving the site's details there will be a new row on the Donation Sites page.

## Viewing Donation Site information

Clicking on the "view" button beside a donation site will show detailed information for that site, including the donation site name, address, contact name, e-mail, phone number, storage location. It also shows a list of the donations for that site including the quantity of items and variety of items. You can drill down to see the full details of each donation by clicking "View donation details".

![Donation Sites Details](images/community/donation_sites/donation_sites_details.jpg)

## Editing Donation Site information

Clicking on the "Edit" button beside a donation site in the donation site list lets you edit the name, address, contact name, email and phone number.

![Edit Donation Site Details](images/community/donation_sites/edit_donation_site.jpg)

## Deactivating a Donation Site

Use the "Deactivate" button to delete information about a donation site that is no longer active.

![Deactivate Donation Sites](images/community/donation_sites/deactivate_donation_site.jpg)

## Exporting Donation Sites

You can export the active donation sites by clicking on the "Export Donation Sites" button. This will provide a .csv file containing the name, address, and contact information for each active donation site.

![Export Donation Sites](images/community/donation_sites/export_donation_sites.jpg)
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions spec/services/exports/export_donations_csv_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"Storage Location",
"Quantity of Items",
"Variety of Items",
"In-Kind Value",
"Comments"
] + expected_item_headers
end
Expand Down Expand Up @@ -84,6 +85,7 @@
donation.storage_view,
donation.line_items.total,
total_item_quantity.count(&:positive?),
donation.in_kind_value_money,
donation.comment
]

Expand Down

0 comments on commit 1af66e8

Please sign in to comment.