Skip to content

KAUI 8.5 - #650

Open
tungleduyxyz wants to merge 3 commits into
masterfrom
kaui_8.5
Open

KAUI 8.5#650
tungleduyxyz wants to merge 3 commits into
masterfrom
kaui_8.5

Conversation

@tungleduyxyz

@tungleduyxyz tungleduyxyz commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Related issues:

@tungleduyxyz tungleduyxyz changed the title Improve invoice translation UI: toggle View/Hide Source button, locale dropdown KAUI 8.5 Aug 2, 2026
@tungleduyxyz
tungleduyxyz requested a review from Copilot August 2, 2026 04:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the invoice translation admin UI to improve usability and reduce locale entry mistakes when uploading invoice translation files.

Changes:

  • Updates the “View Source” button behavior so the label toggles between “View Source” and “Hide Source” based on visibility.
  • Replaces the free-text locale input with a locale dropdown built from the existing all_available_locales helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

html_class: "kaui-button custom-hover",
html_options: {
onclick: '$(this).blur(); $(this).closest("tr").next(".invoice-translation-source-row").toggle(); return false;'
onclick: '$(this).blur(); var $row = $(this).closest("tr").next(".invoice-translation-source-row"); $row.toggle(); $(this).text($row.is(":visible") ? "Hide Source" : "View Source"); return false;'
Adds invoice_number link rendering in account_invoices_columns lambda,
matching the existing payment_number link behavior on the payments listing
page. The invoice number now links to the invoice detail page:
/accounts/{account_id}/invoices/{invoice_id}

Fixes #629

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

lib/kaui.rb:137

  • invoice.invoice_number can be blank (e.g., dry-run invoices). In that case this renders an empty <a> tag, which is confusing and makes the row hard to interact with. Consider falling back to a short invoice id (or a placeholder) when invoice_number isn’t present, while still linking to the invoice details page.
      when 'invoice_number'
        view_context.link_to(invoice.invoice_number, view_context.url_for(controller: :invoices, action: :show, account_id: invoice.account_id, id: invoice.invoice_id))

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.

2 participants