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

issue #4979: Donation site screen improvement #4991

Merged
merged 6 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
18 changes: 0 additions & 18 deletions app/views/donation_sites/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,6 @@
<h3 class="card-title">Donation Sites</h3>
</div>
<!-- /.card-header -->
<!-- form start -->
<div class="card-body">
<table class="table">
<thead>
<tr>
<th>Donation Site</th>
<th>Address</th>
<th>Contact Name</th>
<th>E-mail</th>
<th>Phone</th>
<th>&nbsp;</th>
</tr>
<%= render partial: 'shared/table_row_form',
object: @donation_site,
locals: {columns: [{name: :text_field}, {address: :text_field}, {contact_name: :text_field}, {email: :text_field}, {phone: :text_field}]} %>
</thead>
</table>
</div>
<div class="card-footer">
<div class="pull-right">
<%= modal_button_to("#csvImportModal", {icon: "upload", text: "Import Donation Sites", size: "md"}) if @donation_sites.empty? %>
Expand Down
10 changes: 0 additions & 10 deletions app/views/shared/_table_row_form.html.erb

This file was deleted.

15 changes: 5 additions & 10 deletions docs/user_guide/bank/community_donation_sites.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
READY FOR REVIEW
# Donation Sites

Donation Sites are places where people drop off Donations.
Donation Sites are places where people drop off Donations.

## The Donation Site list
You can manage the sites' information on the "Donation Sites" page under the "Community" section.
You can manage the sites' information on the "Donation Sites" page under the "Community" section.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is still showing the old screen

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the change. Should I wait for confirmation or go ahead with the change on table_row_prepend part ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm about 95% sure that that change should be made. So please go ahead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Oce-ane My apologies, I have a tendency to stop when I see a problem -- there are two more images shown in community_donation_sites.md that are showing the old screen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, really sorry about that ! I think I got them all this time


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 a new site by clicking the "+ New Donation Site" button. This renders a form or you to fill the site's name, address, contact name, e-mail, and phone number. After entering the required details, click the "Save" button to create the new Donation Site.

![Create Donation_Site](images/community/donation_sites/create_donation_site.jpg)
![Add Donation_Site](images/community/donation_sites/add_new_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
Expand Down Expand Up @@ -51,4 +46,4 @@ You can export the active Donation Sites by clicking on the "Export Donation Sit

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

[Prior: Product Drive Participants](community_product_drive_participants.md)[Next: Vendors](community_vendors.md)
[Prior: Product Drive Participants](community_product_drive_participants.md)[Next: Vendors](community_vendors.md)
Binary file not shown.
33 changes: 0 additions & 33 deletions spec/system/donation_site_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,6 @@
expect(page.find(:xpath, "//table/tbody/tr[1]/td[1]")).to have_content(@first.name)
expect(page.find(:xpath, "//table/tbody/tr[3]/td[1]")).to have_content(@third.name)
end

it "allows the user to quick-create a new donation site only with required fields" do
visit subject
donation_site_name = "A Unique Donation Site Name"
donation_site_address = "1500 Remount Road, Front Royal, VA 22630"

fill_in "donation_site_name", with: donation_site_name
fill_in "donation_site_address", with: donation_site_address
click_button "Create"
expect(page.find("tbody tr")).to have_content(donation_site_name)
expect(page.find("tbody tr")).to have_content(donation_site_address)
end

it "allows the user to quick-create a new donation site with all fields including optional ones" do
visit subject
donation_site_name = "A Unique Donation Site Name"
donation_site_address = "1500 Remount Road, Front Royal, VA 22630"
donation_site_contact_name = "John Doe"
donation_site_phone = "123-456-7890"
donation_site_email = "[email protected]"

fill_in "donation_site_name", with: donation_site_name
fill_in "donation_site_address", with: donation_site_address
fill_in "donation_site_contact_name", with: donation_site_contact_name
fill_in "donation_site_phone", with: donation_site_phone
fill_in "donation_site_email", with: donation_site_email
click_button "Create"
expect(page.find("tbody tr")).to have_content(donation_site_name)
expect(page.find("tbody tr")).to have_content(donation_site_address)
expect(page.find("tbody tr")).to have_content(donation_site_contact_name)
expect(page.find("tbody tr")).to have_content(donation_site_phone)
expect(page.find("tbody tr")).to have_content(donation_site_email)
end
end

context "When creating a new donation site" do
Expand Down