-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
4218 customize distribution receipt #4234
Merged
dorner
merged 27 commits into
rubyforgood:main
from
nikolaz90:4218_customize_distribution_receipt
May 10, 2024
Merged
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
8b264a0
add params to print button to alter distribution pdf
nikolaz90 6b2677d
add print params for hide columns on distribution pdf and partial on …
nikolaz90 6e8751a
adds initial spec for #hide_columns on DistributionPDF
nikolaz90 229af82
wip : adds comments and tweaks to DistributionPDF spec
nikolaz90 cf51d5c
undoing params approach to print distribution
nikolaz90 4faa738
add print params for hide columns on distribution pdf and partial on …
nikolaz90 0cd2268
adds initial spec for #hide_columns on DistributionPDF
nikolaz90 b55022d
removed print btn with params distribution with params
nikolaz90 50e8c68
deletion and comments
nikolaz90 64368e2
db:migrate
nikolaz90 1d134dd
add hide option booleans on organizations
nikolaz90 c00e459
resolve conflicts
nikolaz90 640476e
comments
nikolaz90 2e8b185
remove unnecessary partials from distributions show and edit
nikolaz90 4efbdad
add radio buttons to customize distribution receipt on organizations
nikolaz90 f74c276
adds context to distribution pdf spec
nikolaz90 bfb4c2a
add more specs depending on organization print options on distributions
nikolaz90 d8a7116
Merge branch 'main' into 4218_customize_distribution_receipt
nikolaz90 87a11aa
add item name to spec
nikolaz90 f412894
update with upstream
nikolaz90 e3a8e90
Merge branch '4218_customize_distribution_receipt' of github.com:niko…
nikolaz90 42ea8dd
tweak on spec for GH actions
nikolaz90 7fec31c
bundle
nikolaz90 b93bb17
revert timestamps on schema.
nikolaz90 2e4fd61
review hide_columns method on DistributionPDF
nikolaz90 0576430
merge main and resolve conflicts
nikolaz90 2dcd2e3
Merge branch 'main' into 4218_customize_distribution_receipt
dorner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -755,4 +755,4 @@ DEPENDENCIES | |
webmock (~> 3.23) | ||
|
||
BUNDLED WITH | ||
2.5.7 | ||
2.5.9 |
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
9 changes: 9 additions & 0 deletions
9
db/migrate/20240411181624_add_hide_options_for_distribution_printing_to_organizations.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,9 @@ | ||
class AddHideOptionsForDistributionPrintingToOrganizations < ActiveRecord::Migration[7.0] | ||
def change | ||
add_column :organizations, :hide_value_columns_on_receipt, :boolean | ||
add_column :organizations, :hide_package_column_on_receipt, :boolean | ||
# Followed strong migration advice, with Backfill migration too | ||
change_column_default :organizations, :hide_value_columns_on_receipt, false | ||
change_column_default :organizations, :hide_package_column_on_receipt, false | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
...te/20240411183741_backfill_add_hide_options_for_distribution_printing_to_organizations.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,8 @@ | ||
class BackfillAddHideOptionsForDistributionPrintingToOrganizations < ActiveRecord::Migration[7.0] | ||
def change | ||
Organization.unscoped.in_batches do |relation| | ||
relation.update_all hide_value_columns_on_receipt: false, hide_package_column_on_receipt: false | ||
sleep(0.01) | ||
end | ||
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cielf I'm kind of starting to feel like some of these fields belong in a "settings" model. E.g. these and
ytd_on_distribution_printout
- these are suuuper particular to be sitting on essentially our "god model". Thoughts?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a convenience factor in having the organization view looking just at the organization model, I suppose. I do agree that a lot of these are really really specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's talk about it on Sunday -- it would be a new issue, in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to refactor this PR to include a settings table, or print options table if that helps