fix: remove columns DataTable option causing sort/search errors on Invoices and Payments - #644
Open
tungleduyxyz wants to merge 4 commits into
Open
fix: remove columns DataTable option causing sort/search errors on Invoices and Payments#644tungleduyxyz wants to merge 4 commits into
tungleduyxyz wants to merge 4 commits into
Conversation
- List uploaded invoice translations per tenant via Kaui::AdminTenant.get_invoice_translations (uses KillBillClient::Model::Tenant.search_tenant_config with the INVOICE_TRANSLATION_ prefix, since Kill Bill has no dedicated list endpoint) - Fetch translations in AdminTenantsController#show alongside other tab data - Render a table above the upload form matching the existing Overdue/Catalog tab styling, with a View Source toggle per locale
…voices and Payments The 'columns' option defined 9 entries (7 visible + 2 hidden) but the HTML <thead> only renders visible columns (7 <th> elements). With serverSide: true, this mismatch breaks DataTables column index resolution when sorting or applying advanced search filters. Fixes #633
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses DataTables sort/search failures on the Invoices and Payments pages by removing a problematic DataTables columns option, and implements invoice translation listing support in the tenant admin UI (to complement invoice translation uploads).
Changes:
- Removed the DataTables
columnsoption from the Payments and Invoices listing initializations. - Added retrieval (
Kaui::AdminTenant.get_invoice_translations) and controller wiring to load invoice translations for a tenant. - Added a new UI table (and styling) to display existing invoice translations with a “View Source” toggle.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| app/views/kaui/payments/index.html.erb | Removes DataTables columns option from payments table init. |
| app/views/kaui/invoices/index.html.erb | Removes DataTables columns option from invoices table init. |
| app/views/kaui/admin_tenants/_form_invoice_translation.erb | Adds UI to list existing invoice translations and view their source. |
| app/views/kaui/admin_tenants/_form_invoice_template.erb | Minor UI tweak (removes “Current Invoice Template” heading). |
| app/models/kaui/admin_tenant.rb | Adds model helper to fetch invoice translations from tenant config. |
| app/controllers/kaui/admin_tenants_controller.rb | Fetches invoice translations during tenant show page load. |
| app/assets/stylesheets/kaui/tenants.css | Adds styling for the new invoice translations table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merged
tungleduyxyz
added a commit
that referenced
this pull request
Jul 28, 2026
* Add existing invoice translations table to Invoice Translation tab - List uploaded invoice translations per tenant via Kaui::AdminTenant.get_invoice_translations (uses KillBillClient::Model::Tenant.search_tenant_config with the INVOICE_TRANSLATION_ prefix, since Kill Bill has no dedicated list endpoint) - Fetch translations in AdminTenantsController#show alongside other tab data - Render a table above the upload form matching the existing Overdue/Catalog tab styling, with a View Source toggle per locale * fix: remove columns DataTable option causing sort/search errors on Invoices and Payments The 'columns' option defined 9 entries (7 visible + 2 hidden) but the HTML <thead> only renders visible columns (7 <th> elements). With serverSide: true, this mismatch breaks DataTables column index resolution when sorting or applying advanced search filters. Fixes #633 * Refactor style * fix: address Copilot review feedback on PR #644
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.
Uh oh!
There was an error while loading. Please reload this page.