Reports print functionality (#622)

* Print initial impl

* Try to keep the bigger section together

* /* Tufte-inspired Print Report Styles */

* styling

* I8n

* Move print styling out.

* FIX unrelated test ordering

on line 53 - import.rows.first doesn't guarantee ordering. Without an explicit ORDER BY, the database may return rows in any order.

* Update print-report.css

* Update print.html.erb

* pass data to view

* Update index.html.erb

* Fix ERB helpers

* Update reports_helper.rb
This commit is contained in:
soky srm
2026-01-12 14:40:30 +01:00
committed by GitHub
parent a8bdc4469b
commit 25ac822308
10 changed files with 852 additions and 66 deletions

View File

@@ -50,9 +50,10 @@ class ImportEncodingTest < ActiveSupport::TestCase
assert_equal 3, import.rows_count, "Expected 3 data rows"
# Verify Polish characters were preserved correctly
first_row = import.rows.first
assert_not_nil first_row, "Expected first row to exist"
assert_includes first_row.name, "spożywczy", "Polish characters should be preserved"
# Check that any row contains the Polish characters (test is about encoding, not ordering)
assert import.rows.any? { |row| row.name&.include?("spożywczy") }, "Polish characters should be preserved"
# Also verify other Polish characters from different rows
assert import.rows.any? { |row| row.name&.include?("Café") }, "Extended Latin characters should be preserved"
end
test "handles UTF-8 files without modification" do