Skip to content
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

Additional invoice link #65

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

grana-equinix
Copy link
Contributor

@grana-equinix grana-equinix commented Dec 12, 2023

Adds customization details with example from killbill-admin-ui

@@ -99,6 +99,9 @@ module Kaui
# Link to the customer invoice (HTML, PDF, etc.)
self.customer_invoice_link = lambda { |invoice, ctx| ctx.link_to 'View customer invoice html', ctx.kaui_engine.show_html_invoice_path(invoice.invoice_id), :class => 'btn', :target => '_blank' }

# Additinal Link to the customer invoice
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Additional links on the invoice page.

@@ -99,6 +99,9 @@ module Kaui
# Link to the customer invoice (HTML, PDF, etc.)
self.customer_invoice_link = lambda { |invoice, ctx| ctx.link_to 'View customer invoice html', ctx.kaui_engine.show_html_invoice_path(invoice.invoice_id), :class => 'btn', :target => '_blank' }

# Additinal Link to the customer invoice
self.additional_invoice_links = lambda { |invoice, ctx| ctx.link_to 'Addtinal invoice link', ctx.metal_engine.bulk_invoice_adjustment_path(invoice.account_id, invoice.invoice_id), class: 'btn', target: '_self' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example is not very practical for users (metal_engine is proprietary). What does ctx.metal_engine.bulk_invoice_adjustment_path return? A link (maybe wrapped in a <div>)? Could you just hardcode that string?

@pierre
Copy link
Member

pierre commented Jan 20, 2024

@grana-equinix Did you have a chance to look at my comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants