このコミットが含まれているのは:
2026-10-28 00:28:29 +09:00
コミット d6cf992622
27個のファイルの変更、630行の追加、60行の削除
+7 -4
ファイルの表示
@@ -143,8 +143,8 @@ class CountsTableExport
end
def total_label(header)
key = header[:kind] == 'grand_total' ?
(@query.axes.all.length == 1 ? 'singleTotal' : 'grandTotal') : 'subtotal'
key = header[:label_key] || (header[:kind] == 'grand_total' ?
(@query.axes.all.length == 1 ? 'singleTotal' : 'grandTotal') : 'subtotal')
@labels.fetch(key, '')
end
@@ -152,9 +152,10 @@ class CountsTableExport
values = header[:values].each_with_index.map { |value, index|
summary_value(value, index, page)
}
if header[:kind] == 'data' && @previous_pivot_row&.fetch(:kind) == 'data'
if @previous_pivot_row
values.each_index do |index|
if header[:values].first(index + 1) == @previous_pivot_row[:values].first(index + 1)
if (@previous_pivot_row[:values].length > index &&
header[:values].first(index + 1) == @previous_pivot_row[:values].first(index + 1))
values[index] = ''
end
end
@@ -234,6 +235,8 @@ class CountsTableExport
{ row: row[:values], column: column[:values], kind:,
row_kind: row[:kind], column_kind: column[:kind],
row_depth: row[:values].length, column_depth: column[:values].length,
label_key: CountsPivotLayout.label_key(@query.axes.rows.length, @query.axes.columns.length,
row[:values].length, column[:values].length),
count: @pivot_lookup.fetch([row[:values], column[:values]], 0) }
end