Skip to content

Commit

Permalink
Merge pull request #380 from grana-equinix/customize-invoice_search_c…
Browse files Browse the repository at this point in the history
…olumns

Customize invoice list column to show Organization/Account Name
  • Loading branch information
pierre authored Sep 29, 2023
2 parents 75babdd + c99e98e commit e83c480
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/kaui/invoices_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def pagination
end
formatter = lambda do |invoice|
row = [view_context.link_to(invoice.invoice_number, view_context.url_for(controller: :invoices, action: :show, account_id: invoice.account_id, id: invoice.invoice_id))]
row += Kaui.invoice_search_columns.call(invoice, view_context)[1]
row += Kaui.invoice_search_columns.call(invoice, view_context, cached_options_for_klient)[1]
row
end
else
Expand Down
2 changes: 1 addition & 1 deletion lib/kaui.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module Kaui
]
end

self.invoice_search_columns = lambda do |invoice = nil, view_context = nil|
self.invoice_search_columns = lambda do |invoice = nil, view_context = nil, _cached_options_for_klient = nil|
default_label = 'label-info'
default_label = 'label-default' if invoice&.status == 'DRAFT'
default_label = 'label-success' if invoice&.status == 'COMMITTED'
Expand Down

0 comments on commit e83c480

Please sign in to comment.