Skip to content

Commit ae63758

Browse files
committed
Merge branch 'main' into item-request
2 parents 484981f + 36b9034 commit ae63758

75 files changed

Lines changed: 570 additions & 472 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cloud66/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
rails:
22
configuration:
3-
ruby_version: 3.2.2
3+
ruby_version: 3.4.3

.rubocop.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ inherit_gem:
1010
inherit_from:
1111
.rubocop_todo.yml
1212

13-
require:
14-
- rubocop-rails
13+
plugins:
1514
- rubocop-performance
16-
- standard
1715
- standard-rails
1816
- standard-performance
1917

18+
require:
19+
- rubocop-rails
20+
- standard
21+
2022
AllCops:
2123
Exclude:
2224
- "vendor/**/*"

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.2
1+
3.4.3

Gemfile.lock

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@ GEM
268268
concurrent-ruby (~> 1.1)
269269
webrick (~> 1.7)
270270
websocket-driver (~> 0.7)
271-
ffi (1.17.0)
272-
ffi (1.17.0-arm64-darwin)
273-
ffi (1.17.0-x86_64-darwin)
274-
ffi (1.17.0-x86_64-linux-gnu)
271+
ffi (1.17.2)
272+
ffi (1.17.2-arm64-darwin)
273+
ffi (1.17.2-x86_64-darwin)
274+
ffi (1.17.2-x86_64-linux-gnu)
275275
filterrific (5.2.7)
276276
flipper (1.3.4)
277277
concurrent-ruby (< 2)
@@ -329,7 +329,7 @@ GEM
329329
actionview (>= 5.0.0)
330330
activesupport (>= 5.0.0)
331331
jmespath (1.6.2)
332-
json (2.10.2)
332+
json (2.11.3)
333333
jwt (2.10.1)
334334
base64
335335
kaminari (1.2.2)
@@ -454,8 +454,8 @@ GEM
454454
paper_trail (16.0.0)
455455
activerecord (>= 6.1)
456456
request_store (~> 1.4)
457-
parallel (1.26.3)
458-
parser (3.3.7.4)
457+
parallel (1.27.0)
458+
parser (3.3.8.0)
459459
ast (~> 2.4.1)
460460
racc
461461
pdf-core (0.10.0)
@@ -596,22 +596,24 @@ GEM
596596
rspec-mocks (~> 3.13)
597597
rspec-support (~> 3.13)
598598
rspec-support (3.13.2)
599-
rubocop (1.70.0)
599+
rubocop (1.75.4)
600600
json (~> 2.3)
601-
language_server-protocol (>= 3.17.0)
601+
language_server-protocol (~> 3.17.0.2)
602+
lint_roller (~> 1.1.0)
602603
parallel (~> 1.10)
603604
parser (>= 3.3.0.2)
604605
rainbow (>= 2.2.2, < 4.0)
605606
regexp_parser (>= 2.9.3, < 3.0)
606-
rubocop-ast (>= 1.36.2, < 2.0)
607+
rubocop-ast (>= 1.44.0, < 2.0)
607608
ruby-progressbar (~> 1.7)
608609
unicode-display_width (>= 2.4.0, < 4.0)
609-
rubocop-ast (1.43.0)
610+
rubocop-ast (1.44.1)
610611
parser (>= 3.3.7.2)
611612
prism (~> 1.4)
612-
rubocop-performance (1.23.1)
613-
rubocop (>= 1.48.1, < 2.0)
614-
rubocop-ast (>= 1.31.1, < 2.0)
613+
rubocop-performance (1.25.0)
614+
lint_roller (~> 1.1)
615+
rubocop (>= 1.75.0, < 2.0)
616+
rubocop-ast (>= 1.38.0, < 2.0)
615617
rubocop-rails (2.25.1)
616618
activesupport (>= 4.2.0)
617619
rack (>= 1.1)
@@ -672,18 +674,18 @@ GEM
672674
activesupport (>= 5.2)
673675
sprockets (>= 3.0.0)
674676
stackprof (0.2.27)
675-
standard (1.44.0)
677+
standard (1.49.0)
676678
language_server-protocol (~> 3.17.0.2)
677679
lint_roller (~> 1.0)
678-
rubocop (~> 1.70.0)
680+
rubocop (~> 1.75.2)
679681
standard-custom (~> 1.0.0)
680-
standard-performance (~> 1.6)
682+
standard-performance (~> 1.8)
681683
standard-custom (1.0.2)
682684
lint_roller (~> 1.0)
683685
rubocop (~> 1.50)
684-
standard-performance (1.6.0)
686+
standard-performance (1.8.0)
685687
lint_roller (~> 1.1)
686-
rubocop-performance (~> 1.23.0)
688+
rubocop-performance (~> 1.25.0)
687689
standard-rails (1.1.0)
688690
lint_roller (~> 1.0)
689691
rubocop-rails (~> 2.25.0)
@@ -733,16 +735,11 @@ GEM
733735
zeitwerk (2.7.2)
734736

735737
PLATFORMS
736-
arm64-darwin-20
737-
arm64-darwin-21
738-
arm64-darwin-22
739-
arm64-darwin-23
738+
arm64-darwin
740739
ruby
741-
x86_64-darwin-20
742-
x86_64-darwin-21
743-
x86_64-darwin-22
744-
x86_64-darwin-23
740+
x86_64-darwin
745741
x86_64-linux
742+
x86_64-linux-gnu
746743

747744
DEPENDENCIES
748745
annotaterb
@@ -834,4 +831,4 @@ DEPENDENCIES
834831
webmock (~> 3.24)
835832

836833
BUNDLED WITH
837-
2.6.6
834+
2.6.7

app/controllers/admin/organizations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def destroy
8686

8787
def organization_params
8888
params.require(:organization)
89-
.permit(:name, :short_name, :street, :city, :state, :zipcode, :email, :url, :logo, :intake_location, :default_email_text, :account_request_id, :reminder_day, :deadline_day,
89+
.permit(:name, :street, :city, :state, :zipcode, :email, :url, :logo, :intake_location, :default_email_text, :account_request_id, :reminder_day, :deadline_day,
9090
users_attributes: %i(name email organization_admin), account_request_attributes: %i(ndbn_member_id id))
9191
end
9292

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def current_organization
3030
elsif current_role.resource.is_a?(Organization)
3131
current_role.resource
3232
else
33-
Organization.find_by(short_name: params[:organization_name])
33+
Organization.find_by(id: params[:organization_id])
3434
end
3535
end
3636
helper_method :current_organization

app/controllers/donations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def index
4949
respond_to do |format|
5050
format.html
5151
format.csv do
52-
send_data Exports::ExportDonationsCSVService.new(donation_ids: @donations.map(&:id)).generate_csv, filename: "Donations-#{Time.zone.today}.csv"
52+
send_data Exports::ExportDonationsCSVService.new(donation_ids: @donations.map(&:id), organization: current_organization).generate_csv, filename: "Donations-#{Time.zone.today}.csv"
5353
end
5454
end
5555
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class HistoricalTrends::BaseController < ApplicationController
22
def cached_series(type)
3-
Rails.cache.fetch("#{current_organization.short_name}-historical-#{type}-data") { HistoricalTrendService.new(current_organization.id, type).series }
3+
Rails.cache.fetch("#{current_organization.id}-historical-#{type}-data") { HistoricalTrendService.new(current_organization.id, type).series }
44
end
55
end

app/controllers/organizations_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def organization_params
9292
request_type_formatter(params)
9393

9494
params.require(:organization).permit(
95-
:name, :short_name, :street, :city, :state,
95+
:name, :street, :city, :state,
9696
:zipcode, :email, :url, :logo, :intake_location,
9797
:default_storage_location, :default_email_text, :reminder_email_text,
9898
:invitation_text, :reminder_day, :deadline_day,
@@ -102,6 +102,7 @@ def organization_params
102102
:ytd_on_distribution_printout, :one_step_partner_invite,
103103
:hide_value_columns_on_receipt, :hide_package_column_on_receipt,
104104
:signature_for_distribution_pdf, :receive_email_on_requests,
105+
:include_in_kind_values_in_exported_files,
105106
partner_form_fields: [],
106107
request_unit_names: []
107108
)

app/controllers/requests_controller.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,23 @@ def start
4848
redirect_to new_distribution_path(request_id: request.id)
4949
end
5050

51+
def print_picklist
52+
request = current_organization
53+
.requests
54+
.includes(:item_requests, partner: [:profile])
55+
.find(params[:id])
56+
57+
respond_to do |format|
58+
format.any do
59+
pdf = PicklistsPdf.new(current_organization, [request])
60+
send_data pdf.compute_and_render,
61+
filename: format("Picklists_%s.pdf", Time.current.to_fs(:long)),
62+
type: "application/pdf",
63+
disposition: "inline"
64+
end
65+
end
66+
end
67+
5168
def print_unfulfilled
5269
requests = current_organization
5370
.requests

0 commit comments

Comments
 (0)