Merge pull request #3317 from okriuchykhin/ok_SCI_5709

Improve rendering of inventories in reports [SCI-5709]
This commit is contained in:
Alex Kriuchykhin 2021-05-13 11:45:26 +02:00 committed by GitHub
commit 4d30d9dec1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 10 deletions

View file

@ -11,9 +11,9 @@
// Special handling if this is a repository table
if (input.hasClass('hot-repository-items')) {
var headers = inputObj.headers;
var parentEl = el.closest('.report-module-repository-element');
var order = parentEl.attr('data-order') === 'asc';
let headers = inputObj.headers;
let parentEl = el.closest('.report-module-repository-element');
let order = parentEl.attr('data-order') === 'asc';
el.handsontable({
disableVisualSelection: true,

View file

@ -98,12 +98,13 @@
<%= render partial: 'reports/elements/my_module_result_text_element.html.erb', locals: { result: result } %>
<% end %>
<% end %>
<% if @settings.dig('task', 'activities') %>
<%= render partial: 'reports/elements/my_module_activity_element.html.erb', locals: { my_module: my_module } %>
<% end %>
</div>
<div class="report-element-children">
<%= children if (defined? children and children.present?) %>
</div>
<% if @settings.dig('task', 'activities') %>
<div class="report-element-children">
<%= render partial: 'reports/elements/my_module_activity_element.html.erb', locals: { my_module: my_module } %>
</div>
<% end %>
</div>

View file

@ -36,9 +36,9 @@
</div>
<div class="report-element-body">
<% if rows_json[:data].count > 0 %>
<input type="hidden" class="hot-table-contents hot-repository-items" value='<%= rows_json.to_json.force_encoding(Encoding::UTF_8) %>' />
<div class="hot-table-container"></div>
<table class="report-common-table-format"></table>
<input type="hidden" class="hot-table-contents hot-repository-items" value='<%= rows_json.to_json.force_encoding(Encoding::UTF_8) %>' />
<div class="hot-table-container"></div>
<table class="report-common-table-format"></table>
<% else %>
<div class="row">
<div class="col-xs-12">