-
Notifications
You must be signed in to change notification settings - Fork 240
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
spree 4.7 #161
base: master
Are you sure you want to change the base?
spree 4.7 #161
Conversation
with_manage_ability_check(::Spree::BookkeepingDocument). | ||
with_label_translation_key('admin.documents'). | ||
with_items(items). | ||
build |
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.
Layout/MultilineMethodCallIndentation: Use 2 (not 4) spaces for indenting an expression spanning multiple lines.
::Spree::Admin::MainMenu::SectionBuilder.new('documents', 'file.svg'). | ||
with_manage_ability_check(::Spree::BookkeepingDocument). | ||
with_label_translation_key('admin.documents'). | ||
with_items(items). |
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.
Layout/MultilineMethodCallIndentation: Use 2 (not 4) spaces for indenting an expression spanning multiple lines.
Layout/DotPosition: Place the . on the next line, together with the method name.
|
||
::Spree::Admin::MainMenu::SectionBuilder.new('documents', 'file.svg'). | ||
with_manage_ability_check(::Spree::BookkeepingDocument). | ||
with_label_translation_key('admin.documents'). |
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.
Layout/MultilineMethodCallIndentation: Use 2 (not 4) spaces for indenting an expression spanning multiple lines.
Layout/DotPosition: Place the . on the next line, together with the method name.
] | ||
|
||
::Spree::Admin::MainMenu::SectionBuilder.new('documents', 'file.svg'). | ||
with_manage_ability_check(::Spree::BookkeepingDocument). |
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.
Layout/MultilineMethodCallIndentation: Use 2 (not 4) spaces for indenting an expression spanning multiple lines.
Layout/DotPosition: Place the . on the next line, together with the method name.
build | ||
] | ||
|
||
::Spree::Admin::MainMenu::SectionBuilder.new('documents', 'file.svg'). |
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.
Layout/DotPosition: Place the . on the next line, together with the method name.
def build | ||
items = [ | ||
::Spree::Admin::MainMenu::ItemBuilder.new('invoices', ::Spree::Core::Engine.routes.url_helpers.admin_bookkeeping_documents_path(q: { template_eq: 'invoice' })). | ||
with_label_translation_key('admin.invoices'). |
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.
Layout/DotPosition: Place the . on the next line, together with the method name.
|
||
def build | ||
items = [ | ||
::Spree::Admin::MainMenu::ItemBuilder.new('invoices', ::Spree::Core::Engine.routes.url_helpers.admin_bookkeeping_documents_path(q: { template_eq: 'invoice' })). |
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.
Metrics/LineLength: Line is too long. [172/80]
Layout/DotPosition: Place the . on the next line, together with the method name.
class PrintInvoiceBuilder | ||
include ::Spree::Core::Engine.routes.url_helpers | ||
|
||
def build |
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.
Metrics/AbcSize: Assignment Branch Condition size for build is too high. [21.02/15]
Metrics/MethodLength: Method has too many lines. [17/10]
module SpreePrintInvoice | ||
module Admin | ||
module MainMenu | ||
class PrintInvoiceBuilder |
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.
Style/Documentation: Missing top-level class documentation comment.
@@ -0,0 +1,30 @@ | |||
module SpreePrintInvoice |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
end | ||
|
||
def pdf_storage_path(template) | ||
ActiveSupport::Deprecation.warn('This API has changed: Please use order.{packaging_slip, invoice}.pdf_file_path instead') |
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.
Metrics/LineLength: Line is too long. [129/80]
end | ||
|
||
def pdf_file_path | ||
ActiveSupport::Deprecation.warn('This API has changed: Please use order.invoice.pdf_file_path instead') |
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.
Metrics/LineLength: Line is too long. [111/80]
end | ||
|
||
def pdf_filename | ||
ActiveSupport::Deprecation.warn('This API has changed: Please use order.invoice.file_name instead') |
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.
Metrics/LineLength: Line is too long. [107/80]
# ones on Spree::BookkeepingDocument | ||
# | ||
def pdf_file | ||
ActiveSupport::Deprecation.warn('This API has changed: Please use order.invoice.pdf instead') |
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.
Metrics/LineLength: Line is too long. [101/80]
base.state_machine.before_transition to: :complete, do: :invoice_for_order | ||
end | ||
|
||
# Backwards compatibility stuff. Please don't use these methods, rather use the |
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.
Metrics/LineLength: Line is too long. [85/80]
) | ||
|
||
Rails.application.config.spree_backend.main_menu.add_to_section('settings', | ||
::Spree::Admin::MainMenu::ItemBuilder.new('print_invoice.settings', ::Spree::Core::Engine.routes.url_helpers.edit_admin_print_invoice_settings_path). |
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.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
Metrics/LineLength: Line is too long. [155/80]
Layout/DotPosition: Place the . on the next line, together with the method name.
build | ||
) | ||
|
||
Rails.application.config.spree_backend.main_menu.add_to_section('settings', |
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.
Layout/IndentationConsistency: Inconsistent indentation detected.
Rails.application.config.spree_backend.tabs[:order].add( | ||
::Spree::Admin::Tabs::TabBuilder.new(::Spree.t(:documents, scope: [:print_invoice]), ->(resource) { ::Spree::Core::Engine.routes.url_helpers.admin_order_bookkeeping_documents_path(resource) }). | ||
with_icon_key('file.svg'). | ||
with_active_check. |
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.
Layout/DotPosition: Place the . on the next line, together with the method name.
|
||
Rails.application.config.spree_backend.tabs[:order].add( | ||
::Spree::Admin::Tabs::TabBuilder.new(::Spree.t(:documents, scope: [:print_invoice]), ->(resource) { ::Spree::Core::Engine.routes.url_helpers.admin_order_bookkeeping_documents_path(resource) }). | ||
with_icon_key('file.svg'). |
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.
Layout/DotPosition: Place the . on the next line, together with the method name.
Rails.application.config.spree_backend.main_menu.insert_after('dashboard', ::SpreePrintInvoice::Admin::MainMenu::PrintInvoiceBuilder.new.build) | ||
|
||
Rails.application.config.spree_backend.tabs[:order].add( | ||
::Spree::Admin::Tabs::TabBuilder.new(::Spree.t(:documents, scope: [:print_invoice]), ->(resource) { ::Spree::Core::Engine.routes.url_helpers.admin_order_bookkeeping_documents_path(resource) }). |
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.
Metrics/LineLength: Line is too long. [199/80]
Layout/DotPosition: Place the . on the next line, together with the method name.
No description provided.