KAUI 8.5 - #650
Open
tungleduyxyz wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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_localeshelper.
💡 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
Contributor
There was a problem hiding this comment.
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_numbercan 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) wheninvoice_numberisn’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))
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related issues:
Error while uploading invoice translation #624
Toggle 'View Source' button label to 'Hide Source' when source is displayed, and back when hidden
Replace free-text locale input with a dropdown using the existing
all_available_localeshelper, reducing locale entry errorsMake invoice id clickable similar to payment number on payments screen #629
Make invoice number clickable on invoices listing, linking to the invoice detail page
Unable to use Advance filters/Sort on Invoices #633
Fix the table footer overlap