diff --git a/app/views/distributions/_form.html.erb b/app/views/distributions/_form.html.erb index f28782234c..da523a8d3b 100644 --- a/app/views/distributions/_form.html.erb +++ b/app/views/distributions/_form.html.erb @@ -36,6 +36,7 @@
Items in this distribution <% if distribution.request %> +
Quantity - Total Units
Requested
<% end %>
diff --git a/app/views/layouts/partners/navigation/_sidebar.html.erb b/app/views/layouts/partners/navigation/_sidebar.html.erb index b33ad3afd2..922beb725f 100644 --- a/app/views/layouts/partners/navigation/_sidebar.html.erb +++ b/app/views/layouts/partners/navigation/_sidebar.html.erb @@ -10,14 +10,14 @@ diff --git a/app/views/partners/_partner_row.html.erb b/app/views/partners/_partner_row.html.erb index e295988684..55d62a13ad 100644 --- a/app/views/partners/_partner_row.html.erb +++ b/app/views/partners/_partner_row.html.erb @@ -34,10 +34,10 @@ <%= invite_button_to(invite_partner_path(partner_row), confirm: "Send an invitation to #{partner_row.name} to begin using the partner application?") %> <% end %> <% when "invited" %> - <%= view_button_to partner_path(partner_row) + "#partner-information", { text: "Review Application", icon: "check", type: "warning" } %> + <%= view_button_to partner_path(partner_row) + "#partner-information", { text: "Review Applicant's Profile", icon: "check", type: "warning" } %> <%= invite_button_to(invite_partner_path(partner_row), confirm: "Re-send an invitation to #{partner_row.name}?", text: 'Re-send Invite') %> <% when "awaiting_review" %> - <%= view_button_to partner_path(partner_row) + "#partner-information", { text: "Review Application", icon: "check", type: "warning" } %> + <%= view_button_to partner_path(partner_row) + "#partner-information", { text: "Review Applicant's Profile", icon: "check", type: "warning" } %> <% when "approved" %> <%= button_to recertify_partner_partner_path(partner_row), data: { confirm: "Recertify partner #{partner_row.name}?"}, class: "btn btn-xs bg-red" do %> Request Recertification diff --git a/app/views/partners/profiles/edit.html.erb b/app/views/partners/profiles/edit.html.erb index 77f8dd00de..c671712d5e 100644 --- a/app/views/partners/profiles/edit.html.erb +++ b/app/views/partners/profiles/edit.html.erb @@ -3,7 +3,7 @@
<% content_for :title, "Editing - #{current_partner.name}" %> -

  Edit My Organization    +

  Edit My Profile    <%= partner_status_badge(current_partner) %> for <%= current_partner.name %>

diff --git a/app/views/partners/show.html.erb b/app/views/partners/show.html.erb index a2ee539850..e1280b31f6 100644 --- a/app/views/partners/show.html.erb +++ b/app/views/partners/show.html.erb @@ -189,7 +189,7 @@
-

Application & Information

+

Partner Profile

<% unless @partner.approved? %> diff --git a/app/views/purchases/show.html.erb b/app/views/purchases/show.html.erb index d75fb18684..9969b9153c 100644 --- a/app/views/purchases/show.html.erb +++ b/app/views/purchases/show.html.erb @@ -30,17 +30,28 @@
+ + + + + + + - - - + + + +
Date of Purchase:Vendor:Storage Location:
Date of Purchase:Vendor:Storage Location:<%= @purchase.issued_at.to_fs(:distribution_date) %> (entered: <%= @purchase.created_at.to_fs(:distribution_date) %>)<%= @purchase.purchased_from_view %><%= @purchase.storage_view %>
+ + + + + - - - +
Comment:
<%= @purchase.issued_at.to_fs(:distribution_date) %> (entered: <%= @purchase.created_at.to_fs(:distribution_date) %>)<%= @purchase.purchased_from_view %><%= @purchase.storage_view %><%= @purchase.comment || '' %>
diff --git a/docs/user_guide/bank/essentials_dashboard.md b/docs/user_guide/bank/essentials_dashboard.md index 1ef9214ed3..f818402206 100644 --- a/docs/user_guide/bank/essentials_dashboard.md +++ b/docs/user_guide/bank/essentials_dashboard.md @@ -19,7 +19,7 @@ This is pretty much what it sounds like - a list of the requests from your partn ![bottom of dashboard page](images/essentials/dashboard/essentials_dashboard_2.png) #### Partner Approvals -This lists the partner profiles that have been submitted for approval. Partners can not submit requests until they have been approved. To review the application, click on the "Review Application" button beside the partner in the Action colum. For more details on that, see [Approving a partner](pm_approving_a_partner.md) +This lists the partner profiles that have been submitted for approval. Partners can not submit requests until they have been approved. To review the application, click on the "Review Applicant's Profile" button beside the partner in the Action column. For more details on that, see [Approving a partner](pm_approving_a_partner.md) #### Bank-wide Low Inventory This lists items whose *bank-wide* inventory has fallen below the recommended or minimum quantity levels you have set on the items. If the item's level in inventory across the bank has fallen below the minimum quantity, it will appear in red. diff --git a/spec/requests/purchases_requests_spec.rb b/spec/requests/purchases_requests_spec.rb index abf7f1342a..d60b23f484 100644 --- a/spec/requests/purchases_requests_spec.rb +++ b/spec/requests/purchases_requests_spec.rb @@ -264,7 +264,21 @@ describe "GET #show" do let(:item) { create(:item) } - let!(:purchase) { create(:purchase, :with_items, item: item) } + let(:storage_location) { create(:storage_location, organization: organization, name: 'Some Storage') } + let(:vendor) { create(:vendor, organization: organization, business_name: 'Another Business') } + let(:purchase) { create(:purchase, :with_items, comment: 'Fine day for diapers, it is.', created_at: 1.month.ago, issued_at: 1.day.ago, item: item, storage_location: storage_location, vendor: vendor) } + + it "shows the purchase info" do + freeze_time do + date_of_purchase = "#{1.day.ago.to_fs(:distribution_date)} (entered: #{1.month.ago.to_fs(:distribution_date)})" + + get purchase_path(id: purchase.id) + expect(response.body).to include(date_of_purchase) + expect(response.body).to include('Another Business') + expect(response.body).to include('Some Storage') + expect(response.body).to include('Fine day for diapers, it is.') + end + end it "shows an enabled edit button" do get purchase_path(id: purchase.id) diff --git a/spec/system/partner_system_spec.rb b/spec/system/partner_system_spec.rb index e27747f8da..b54b9fc42b 100644 --- a/spec/system/partner_system_spec.rb +++ b/spec/system/partner_system_spec.rb @@ -22,9 +22,9 @@ visit partners_path assert page.has_content? partner_awaiting_approval.name - click_on 'Review Application' + click_on "Review Applicant's Profile" - assert page.has_content?('Application & Information') + assert page.has_content?('Partner Profile') click_on 'Approve Partner' assert page.has_content? 'Partner approved!' @@ -45,7 +45,7 @@ assert page.has_content? partner_awaiting_approval.name - click_on 'Review Application' + click_on "Review Applicant's Profile" click_on 'Approve Partner' assert page.has_content? "Failed to approve partner because: #{fake_error_msg}" @@ -539,5 +539,5 @@ def visit_approval_page(partner_name:) visit partners_path ele = find('tr', text: partner_name) - within(ele) { click_on "Review Application" } + within(ele) { click_on "Review Applicant's Profile" } end diff --git a/spec/system/partners/approval_process_spec.rb b/spec/system/partners/approval_process_spec.rb index cc27021951..26d69cbcd4 100644 --- a/spec/system/partners/approval_process_spec.rb +++ b/spec/system/partners/approval_process_spec.rb @@ -26,7 +26,7 @@ context 'AND they fill out the form and submit it' do before do - click_on 'My Organization' + click_on 'My Profile' assert page.has_content? 'Uninvited' click_on 'Update Information' @@ -76,7 +76,7 @@ partner.profile.update(website: '', facebook: '', twitter: '', instagram: '', no_social_media_presence: false, partner_status: 'pending') login_as(partner_user) visit partner_user_root_path - click_on 'My Organization' + click_on 'My Profile' click_on 'Submit for Approval' end diff --git a/spec/system/profile_served_area_system_spec.rb b/spec/system/profile_served_area_system_spec.rb index 9c20d02d9b..b3d260f312 100644 --- a/spec/system/profile_served_area_system_spec.rb +++ b/spec/system/profile_served_area_system_spec.rb @@ -35,7 +35,7 @@ expect(page).to have_content("100 %") expect(page).not_to have_content("The total client share must be either 0 or 100 %") click_on "Update Information" - expect(page).to have_content("Application & Information") + expect(page).to have_content("Partner Profile") expect(page).to have_content("26 %") end